regenerate_framing.sh 725 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Copyright 2007 - 2021, Alan Antonuk and the rabbitmq-c contributors.
  3. # SPDX-License-Identifier: mit
  4. set -e
  5. RMQ_VERSION=3.8.19
  6. DATA=${PWD}/codegen/rabbitmq-server-${RMQ_VERSION}/deps/rabbitmq_codegen/amqp-rabbitmq-0.9.1.json
  7. export PYTHONPATH=${PWD}/codegen/rabbitmq-server-${RMQ_VERSION}/deps/rabbitmq_codegen
  8. rm -rf codegen
  9. mkdir codegen
  10. wget -c https://github.com/rabbitmq/rabbitmq-server/releases/download/v${RMQ_VERSION}/rabbitmq-server-${RMQ_VERSION}.tar.xz -O - | tar -xJ -C codegen
  11. python librabbitmq/codegen.py header ${DATA} include/rabbitmq-c/framing.h
  12. python librabbitmq/codegen.py body ${DATA} librabbitmq/amqp_framing.c
  13. clang-format -i include/rabbitmq-c/framing.h librabbitmq/amqp_framing.c