Skip to content

Commit eb57e1b

Browse files
Merge pull request #4378 from rabbitmq/mergify/bp/v3.9.x/pr-4375
Update amqp10_client and amqp10_common for hex.pm publish (backport #4245) (backport #4375)
2 parents 95c1e6c + 61110fe commit eb57e1b

File tree

6 files changed

+44
-276
lines changed

6 files changed

+44
-276
lines changed

deps/amqp10_client/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,30 @@ PROJECT = amqp10_client
22
PROJECT_DESCRIPTION = AMQP 1.0 client from the RabbitMQ Project
33
PROJECT_MOD = amqp10_client_app
44

5+
define PROJECT_APP_EXTRA_KEYS
6+
%% Hex.pm package informations.
7+
{licenses, ["MPL-2.0"]},
8+
{links, [
9+
{"Website", "https://www.rabbitmq.com/"},
10+
{"GitHub", "https://github.com/rabbitmq/rabbitmq-server/deps/amqp10_client"}
11+
]},
12+
{build_tools, ["make", "rebar3"]},
13+
{files, [
14+
$(RABBITMQ_HEXPM_DEFAULT_FILES)
15+
]}
16+
endef
17+
18+
# Release artifacts are put in $(PACKAGES_DIR).
19+
PACKAGES_DIR ?= $(abspath PACKAGES)
20+
521
BUILD_DEPS = rabbit_common elvis_mk
622
DEPS = amqp10_common
723
TEST_DEPS = rabbit rabbitmq_amqp1_0 rabbitmq_ct_helpers
824
LOCAL_DEPS = ssl inets crypto
925

1026
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-test.mk
1127
DEP_PLUGINS = rabbit_common/mk/rabbitmq-macros.mk \
28+
rabbit_common/mk/rabbitmq-build.mk \
1229
rabbit_common/mk/rabbitmq-hexpm.mk \
1330
rabbit_common/mk/rabbitmq-dist.mk \
1431
rabbit_common/mk/rabbitmq-run.mk \

deps/amqp10_common/.travis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

deps/amqp10_common/Makefile

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
PROJECT = amqp10_common
22
PROJECT_DESCRIPTION = Modules shared by rabbitmq-amqp1.0 and rabbitmq-amqp1.0-client
33

4-
DIALYZER_OPTS += --src -r test
4+
define PROJECT_APP_EXTRA_KEYS
5+
%% Hex.pm package informations.
6+
{licenses, ["MPL-2.0"]},
7+
{links, [
8+
{"Website", "https://www.rabbitmq.com/"},
9+
{"GitHub", "https://github.com/rabbitmq/rabbitmq-server/deps/amqp10_common"}
10+
]},
11+
{build_tools, ["make", "rebar3"]},
12+
{files, [
13+
$(RABBITMQ_HEXPM_DEFAULT_FILES),
14+
"mk"
15+
]}
16+
endef
517

18+
DIALYZER_OPTS += --src -r test
619
BUILD_DEPS = rabbit_common
720

8-
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-test.mk
9-
DEP_PLUGINS = rabbit_common/mk/rabbitmq-macros.mk \
10-
rabbit_common/mk/rabbitmq-hexpm.mk \
11-
rabbit_common/mk/rabbitmq-dist.mk \
12-
rabbit_common/mk/rabbitmq-test.mk \
13-
rabbit_common/mk/rabbitmq-tools.mk
14-
1521
# FIXME: Use erlang.mk patched for RabbitMQ, while waiting for PRs to be
1622
# reviewed and merged.
1723

@@ -28,6 +34,13 @@ ERLANG_MK_COMMIT = rabbitmq-tmp
2834

2935
-include development.pre.mk
3036

37+
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-test.mk
38+
DEP_PLUGINS = rabbit_common/mk/rabbitmq-build.mk \
39+
rabbit_common/mk/rabbitmq-hexpm.mk \
40+
rabbit_common/mk/rabbitmq-dist.mk \
41+
rabbit_common/mk/rabbitmq-test.mk \
42+
rabbit_common/mk/rabbitmq-tools.mk
43+
3144
include ../../rabbitmq-components.mk
3245
include ../../erlang.mk
3346

deps/amqp_client/.travis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

deps/amqp_client/Makefile

Lines changed: 2 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ endef
1313

1414
define PROJECT_APP_EXTRA_KEYS
1515
%% Hex.pm package informations.
16-
{licenses, ["MPL 2.0"]},
16+
{licenses, ["MPL-2.0"]},
1717
{links, [
1818
{"Website", "https://www.rabbitmq.com/"},
19-
{"GitHub", "https://github.com/rabbitmq/rabbitmq-erlang-client"},
19+
{"GitHub", "https://github.com/rabbitmq/rabbitmq-server/deps/amqp_client"},
2020
{"User guide", "https://www.rabbitmq.com/erlang-client-user-guide.html"}
2121
]},
2222
{build_tools, ["make", "rebar3"]},
@@ -52,147 +52,3 @@ WITHOUT = plugins/proper
5252

5353
include ../../rabbitmq-components.mk
5454
include ../../erlang.mk
55-
56-
# --------------------------------------------------------------------
57-
# Distribution.
58-
# --------------------------------------------------------------------
59-
60-
.PHONY: distribution
61-
62-
distribution: docs source-dist package
63-
64-
docs:: edoc
65-
edoc: doc/overview.edoc
66-
67-
doc/overview.edoc: src/overview.edoc.in
68-
mkdir -p doc
69-
sed -e 's:%%VERSION%%:$(PROJECT_VERSION):g' < $< > $@
70-
71-
.PHONY: source-dist clean-source-dist
72-
73-
SOURCE_DIST_BASE ?= $(PROJECT)
74-
SOURCE_DIST_SUFFIXES ?= tar.xz zip
75-
SOURCE_DIST ?= $(PACKAGES_DIR)/$(SOURCE_DIST_BASE)-$(PROJECT_VERSION)-src
76-
77-
# The first source distribution file is used by packages: if the archive
78-
# type changes, you must update all packages' Makefile.
79-
SOURCE_DIST_FILES = $(addprefix $(SOURCE_DIST).,$(SOURCE_DIST_SUFFIXES))
80-
81-
.PHONY: $(SOURCE_DIST_FILES)
82-
83-
source-dist: $(SOURCE_DIST_FILES)
84-
@:
85-
86-
RSYNC ?= rsync
87-
RSYNC_V_0 =
88-
RSYNC_V_1 = -v
89-
RSYNC_V_2 = -v
90-
RSYNC_V = $(RSYNC_V_$(V))
91-
RSYNC_FLAGS += -a $(RSYNC_V) \
92-
--exclude '.sw?' --exclude '.*.sw?' \
93-
--exclude '*.beam' \
94-
--exclude '*.d' \
95-
--exclude '*.pyc' \
96-
--exclude '.git*' \
97-
--exclude '.hg*' \
98-
--exclude '.travis.yml' \
99-
--exclude '.*.plt' \
100-
--exclude '$(notdir $(ERLANG_MK_TMP))' \
101-
--exclude 'cover/' \
102-
--exclude 'deps/' \
103-
--exclude 'ebin/' \
104-
--exclude 'erl_crash.dump' \
105-
--exclude '$(notdir $(DEPS_DIR))/' \
106-
--exclude 'doc/' \
107-
--exclude 'hexer*' \
108-
--exclude 'logs/' \
109-
--exclude 'plugins/' \
110-
--exclude '$(notdir $(DIST_DIR))/' \
111-
--exclude 'test' \
112-
--exclude 'xrefr' \
113-
--exclude '/$(notdir $(PACKAGES_DIR))/' \
114-
--exclude '/PACKAGES/' \
115-
--delete \
116-
--delete-excluded
117-
118-
TAR ?= tar
119-
TAR_V_0 =
120-
TAR_V_1 = -v
121-
TAR_V_2 = -v
122-
TAR_V = $(TAR_V_$(V))
123-
124-
GZIP ?= gzip
125-
BZIP2 ?= bzip2
126-
XZ ?= xz
127-
128-
ZIP ?= zip
129-
ZIP_V_0 = -q
130-
ZIP_V_1 =
131-
ZIP_V_2 =
132-
ZIP_V = $(ZIP_V_$(V))
133-
134-
.PHONY: $(SOURCE_DIST)
135-
136-
$(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST)
137-
$(verbose) mkdir -p $(dir $@)
138-
$(gen_verbose) $(RSYNC) $(RSYNC_FLAGS) ./ $@/
139-
$(verbose) echo "$(PROJECT_DESCRIPTION) $(PROJECT_VERSION)" > $@/git-revisions.txt
140-
$(verbose) echo "$(PROJECT) $$(git rev-parse HEAD) $$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)" >> $@/git-revisions.txt
141-
$(verbose) for dep in $$(cat $(ERLANG_MK_RECURSIVE_DEPS_LIST) | grep -v '/$(PROJECT)$$' | LC_COLLATE=C sort); do \
142-
$(RSYNC) $(RSYNC_FLAGS) \
143-
$$dep \
144-
$@/deps; \
145-
if test -f $@/deps/$$(basename $$dep)/erlang.mk && \
146-
test "$$(wc -l $@/deps/$$(basename $$dep)/erlang.mk | awk '{print $$1;}')" = "1" && \
147-
grep -qs -E "^[[:blank:]]*include[[:blank:]]+(erlang\.mk|.*/erlang\.mk)$$" $@/deps/$$(basename $$dep)/erlang.mk; then \
148-
echo "include ../../erlang.mk" > $@/deps/$$(basename $$dep)/erlang.mk; \
149-
fi; \
150-
sed -E -i.bak "s|^[[:blank:]]*include[[:blank:]]+\.\./.*erlang.mk$$|include ../../erlang.mk|" \
151-
$@/deps/$$(basename $$dep)/Makefile && \
152-
rm $@/deps/$$(basename $$dep)/Makefile.bak; \
153-
(cd $$dep; echo "$$(basename "$$dep") $$(git rev-parse HEAD) $$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)") >> $@/git-revisions.txt; \
154-
done
155-
$(verbose) for file in $$(find $@ -name '*.app.src'); do \
156-
sed -E -i.bak \
157-
-e 's/[{]vsn[[:blank:]]*,[[:blank:]]*(""|"0.0.0")[[:blank:]]*}/{vsn, "$(PROJECT_VERSION)"}/' \
158-
$$file; \
159-
rm $$file.bak; \
160-
done
161-
$(verbose) rm $@/README.in
162-
$(verbose) cp README.in $@/README
163-
$(verbose) if test "$(BUILD_DOC)"; then cat "$(BUILD_DOC)" >> $@/README; fi
164-
165-
# TODO: Fix file timestamps to have reproducible source archives.
166-
# $(verbose) find $@ -not -name 'git-revisions.txt' -print0 | xargs -0 touch -r $@/git-revisions.txt
167-
168-
$(SOURCE_DIST).tar.gz: $(SOURCE_DIST)
169-
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
170-
find $(notdir $(SOURCE_DIST)) -print0 | LC_COLLATE=C sort -z | \
171-
xargs -0 $(TAR) $(TAR_V) --no-recursion -cf - | \
172-
$(GZIP) --best > $@
173-
174-
$(SOURCE_DIST).tar.bz2: $(SOURCE_DIST)
175-
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
176-
find $(notdir $(SOURCE_DIST)) -print0 | LC_COLLATE=C sort -z | \
177-
xargs -0 $(TAR) $(TAR_V) --no-recursion -cf - | \
178-
$(BZIP2) > $@
179-
180-
$(SOURCE_DIST).tar.xz: $(SOURCE_DIST)
181-
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
182-
find $(notdir $(SOURCE_DIST)) -print0 | LC_COLLATE=C sort -z | \
183-
xargs -0 $(TAR) $(TAR_V) --no-recursion -cf - | \
184-
$(XZ) > $@
185-
186-
$(SOURCE_DIST).zip: $(SOURCE_DIST)
187-
$(verbose) rm -f $@
188-
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
189-
find $(notdir $(SOURCE_DIST)) -print0 | LC_COLLATE=C sort -z | \
190-
xargs -0 $(ZIP) $(ZIP_V) $@
191-
192-
clean:: clean-source-dist
193-
194-
clean-source-dist:
195-
$(gen_verbose) rm -rf -- $(SOURCE_DIST_BASE)-*
196-
197-
package: dist
198-
cp $(DIST_DIR)/*.ez $(PACKAGES_DIR)

deps/rabbit_common/mk/rabbitmq-hexpm.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ $(HEXPM_CLI):
1313
$(verbose) chmod +x $@
1414

1515
RABBIT_COMMON_HEXPM_VERSION = $(PROJECT_VERSION)
16+
AMQP10_COMMON_HEXPM_VERSION = $(PROJECT_VERSION)
17+
AMQP10_CLIENT_HEXPM_VERSION = $(PROJECT_VERSION)
1618
AMQP_CLIENT_HEXPM_VERSION = $(PROJECT_VERSION)
1719

1820
rebar.config: dep_rabbit_common = hex $(RABBIT_COMMON_HEXPM_VERSION)
21+
rebar.config: dep_amqp10_common = hex $(AMQP10_COMMON_HEXPM_VERSION)
22+
rebar.config: dep_amqp10_client = hex $(AMQP10_CLIENT_HEXPM_VERSION)
1923
rebar.config: dep_amqp_client = hex $(AMQP_CLIENT_HEXPM_VERSION)
2024

2125
define RABBITMQ_HEXPM_DEFAULT_FILES

0 commit comments

Comments
 (0)