Skip to content

Commit 7214c13

Browse files
packaging: bundle latest cmk x86 build with deb and rpm packages (#9450)
This uses the latest tag to find and use the latest Github tag from cloudstack-cloudmonkey repo, and use that to bundle the binary CLI in packages. Signed-off-by: Rohit Yadav <[email protected]> Co-authored-by: Wei Zhou <[email protected]>
1 parent cd8442a commit 7214c13

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

debian/rules

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ VERSION := $(shell grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2
44
PACKAGE = $(shell dh_listpackages|head -n 1|cut -d '-' -f 1)
55
SYSCONFDIR = "/etc"
66
DESTDIR = "debian/tmp"
7+
CMK_REL := $(shell wget -O - "https://api.github.com/repos/apache/cloudstack-cloudmonkey/releases" 2>/dev/null | jq -r '.[0].tag_name')
78

89
%:
910
dh $@ --with systemd
@@ -85,7 +86,7 @@ override_dh_auto_install:
8586
rm -rf $(DESTDIR)/usr/share/$(PACKAGE)-management/templates/systemvm/md5sum.txt
8687

8788
# Bundle cmk in cloudstack-management
88-
wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/6.3.0/cmk.linux.x86-64 -O $(DESTDIR)/usr/bin/cmk
89+
wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/$(CMK_REL)/cmk.linux.x86-64 -O $(DESTDIR)/usr/bin/cmk
8990
chmod +x $(DESTDIR)/usr/bin/cmk
9091

9192
# nast hack for a couple of configuration files

packaging/centos8/cloud.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ install -D client/target/utilities/bin/cloud-setup-baremetal ${RPM_BUILD_ROOT}%{
260260
install -D client/target/utilities/bin/cloud-sysvmadm ${RPM_BUILD_ROOT}%{_bindir}/%{name}-sysvmadm
261261
install -D client/target/utilities/bin/cloud-update-xenserver-licenses ${RPM_BUILD_ROOT}%{_bindir}/%{name}-update-xenserver-licenses
262262
# Bundle cmk in cloudstack-management
263-
wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/6.3.0/cmk.linux.x86-64 -O ${RPM_BUILD_ROOT}%{_bindir}/cmk
263+
CMK_REL=$(wget -O - "https://api.github.com/repos/apache/cloudstack-cloudmonkey/releases" 2>/dev/null | jq -r '.[0].tag_name')
264+
wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/$CMK_REL/cmk.linux.x86-64 -O ${RPM_BUILD_ROOT}%{_bindir}/cmk
264265
chmod +x ${RPM_BUILD_ROOT}%{_bindir}/cmk
265266

266267
cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup

0 commit comments

Comments
 (0)