[asterisk-commits] push-release: Add script to push artifacts to their pending ... (repotools[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 27 19:56:27 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: push-release: Add script to push artifacts to their pending directory
......................................................................


push-release: Add script to push artifacts to their pending directory

This patch adds a bash script that will push the artifacts created as a
result of 'mkrelease.py' to their pending release directory. This script
is extracted from the original bash mkrelease script, and is now invoked
at the end of the mkrelease.py script.

This patch also installs both mkrelease.py and push-release.sh to the
bin directory via the repo Makefile, such that different users can
invoke the scripts without having to checkout repotools locally.

Change-Id: If2d8f8b63c5eebf26d6951ea7423a7217d427ce7
---
M Makefile.in
M mkrelease.py
A push-release.sh
3 files changed, 51 insertions(+), 0 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Matt Jordan: Looks good to me, approved; Verified



diff --git a/Makefile.in b/Makefile.in
index f0d446c..c7e9744 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -46,6 +46,9 @@
 	$(INSTALL) -m 755 autotag_externals $(DESTDIR)$(BINDIR)/autotag_externals
 	$(INSTALL) -m 755 svn-reintegrate.sh $(DESTDIR)$(BINDIR)/svn-reintegrate
 	$(INSTALL) -m 755 svn-base-diff.sh $(DESTDIR)$(BINDIR)/svn-base-diff
+	$(INSTALL) -m 755 mkrelease.py $(DESTDIR)$(BINDIR)/mkrelease.py
+	$(INSTALL) -m 755 push-release.sh $(DESTDIR)$(BINDIR)/push-release.sh
+
 
 install-mergetool: Makefile
 	$(SED) -e 's#@@BINDIR@@#$(BINDIR)#g' -e 's#@@TIMEOUT@@#$(TIMEOUT)#g' -e 's#@@REPOTOOLS@@#$(CURDIR)#g' mergetool > /tmp/mergetool.install
@@ -66,3 +69,5 @@
 	$(RMF) $(DESTDIR)$(BINDIR)/merge2trunk
 	$(RMF) $(DESTDIR)$(BINDIR)/mergerev
 	$(RMF) $(DESTDIR)$(BINDIR)/sign-releases
+	$(RMF) $(DESTDIR)$(BINDIR)/mkrelease.py
+	$(RMF) $(DESTDIR)$(BINDIR)/push-release.sh
diff --git a/mkrelease.py b/mkrelease.py
index 6fec6b1..e2a1d7b 100755
--- a/mkrelease.py
+++ b/mkrelease.py
@@ -646,6 +646,9 @@
     tag_archive = create_tag_archive(repo)
     create_final_archive(tag_archive)
 
+    # Push it live!
+    os.system('push-release.sh {0} {1}'.format(version, options.project))
+
     print "Congratulations on the successful creation of {0} {1}!".format(
         options.project, options.version)
 
diff --git a/push-release.sh b/push-release.sh
new file mode 100755
index 0000000..65c264d
--- /dev/null
+++ b/push-release.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Moves the created release artifacts to the pending release directory
+#
+# Extracted from the original mkrelease script
+#
+# Copyright 2015 (C), Digium, Inc.
+# Matt Jordan <mjordan at digium.com>
+
+
+VERSION=$1
+FTP_PROJECT=$2
+
+if [ -z ${VERSION} ]; then
+	echo "A version is required."
+	exit 1
+fi
+
+if [ -z ${FTP_PROJECT} ]; then
+	FTP_PROJECT="asterisk"
+fi
+
+if [ ! -d ftp-${FTP_PROJECT} ]; then
+	svn co https://origsvn.digium.com/svn/sites/downloads.asterisk.org/telephony/${FTP_PROJECT}/pending ftp-${FTP_PROJECT}
+else
+	pushd ftp-${FTP_PROJECT}
+	svn up
+	popd
+fi
+
+for NEW_FILE in `ls | grep ${VERSION}`; do
+	mv ${NEW_FILE} ftp-${FTP_PROJECT}/.
+	svn add ftp-${FTP_PROJECT}/${NEW_FILE}
+done
+
+pushd ftp-${FTP_PROJECT}
+svn ps svn:mime-type application/octet-stream *.gz
+svn ps svn:mime-type text/plain *.asc *.sha1 *.sha256 *.md5 ChangeLog* README*
+svn ps svn:eol-style native *.asc *.sha1 *.sha256 *.md5 ChangeLog* README* *-summary.txt *-summary.html
+svn ps svn:keywords none *.asc *.sha1 *.sha256 *.md5 ChangeLog* README* *-summary.txt *-summary.html
+svn commit -m "Adding files for the release of ${VERSION}"
+popd
+

-- 
To view, visit https://gerrit.asterisk.org/972
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If2d8f8b63c5eebf26d6951ea7423a7217d427ce7
Gerrit-PatchSet: 1
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list