[asterisk-commits] processpending and releaser updates (repotools[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 15 14:26:53 CST 2016


Joshua Colp has submitted this change and it was merged.

Change subject: processpending and releaser updates
......................................................................


processpending and releaser updates

Before running processpending it is easy to forget to update the local repo, so
this adds a 'svn up' statement before processing.

This also fixes releaser.sh to make sure all the old file links get removed as
well as update the added links to match the new 'asterisk-certified' format.

Change-Id: I8cdad1f5fb193561dcbbedc783ef0d70143e4dd5
---
M processpending
M releaser.sh
2 files changed, 46 insertions(+), 124 deletions(-)

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



diff --git a/processpending b/processpending
index cfb72a2..3b4e57d 100755
--- a/processpending
+++ b/processpending
@@ -18,6 +18,7 @@
 
 read
 
+svn up
 for n in `ls pending` ; do
 	svn mv pending/$n releases/
 	ln -s releases/$n $n
diff --git a/releaser.sh b/releaser.sh
index b1febe8..691402e 100755
--- a/releaser.sh
+++ b/releaser.sh
@@ -23,98 +23,54 @@
 	PROJECT=$5
 fi
 
+commit_changes () {
+    echo "Going to commit - \"$1 links for Asterisk $2\". Press any key to continue."
+    read
+    svn commit -m "$1 links for asterisk-$2."
+    echo "Committed - $1 links for Asterisk $2."
+}
+
+remove_links () {
+    echo "Removing links to asterisk-$1."
+    find -maxdepth 1 -type l -name "asterisk-$1*" -exec svn rm {} \;
+
+    svn rm ChangeLog-$1*
+    svn rm README-$1*
+}
+
+add_links () {
+    echo "Adding links to Asterisk $1 for $2-current."
+    ln -s releases/asterisk-$1.tar.gz ./asterisk-$2-current.tar.gz
+    ln -s releases/asterisk-$1.tar.gz.asc ./asterisk-$2-current.tar.gz.asc
+    ln -s releases/asterisk-$1.sha1 ./asterisk-$2-current.sha1
+    ln -s releases/asterisk-$1.sha256 ./asterisk-$2-current.sha256
+    ln -s releases/asterisk-$1.md5 ./asterisk-$2-current.md5
+    ln -s releases/asterisk-$1-patch.tar.gz ./asterisk-$2-current-patch.tar.gz
+    ln -s releases/asterisk-$1-patch.tar.gz.asc ./asterisk-$2-current-patch.tar.gz.asc
+    ln -s releases/README-$1 ./README-$2-current
+    ln -s releases/ChangeLog-$1 ./ChangeLog-$2-current
+    ln -s releases/asterisk-$1-summary.html ./asterisk-$2-current-summary.html
+    ln -s releases/asterisk-$1-summary.txt ./asterisk-$2-current-summary.txt
+    svn add *$2-current*
+}
+
 if [ "$TYPE" = "release" ]; then
-
 	if [ "$PROJECT" = "asterisk" ]; then
-		cd ~/downloads/asterisk-site
+		remove_links $OLD_VERSION
+		remove_links $BRANCH-current
+		commit_changes "remove" "$OLD_VERSION and $BRANCH-current"
 
-		# Remove old files
-		echo "Removing links to Asterisk $OLD_VERSION and $BRANCH-current."
-		svn rm asterisk-$OLD_VERSION.tar.gz
-		svn rm asterisk-$OLD_VERSION.tar.gz.asc
-		svn rm asterisk-$OLD_VERSION.tar.gz.sha1
-		svn rm asterisk-$BRANCH-current.tar.gz
-		svn rm asterisk-$BRANCH-current.tar.gz.asc
-		svn rm asterisk-$BRANCH-current.sha1
-		svn rm asterisk-$BRANCH-current.sha256
-		svn rm asterisk-$BRANCH-current.md5
-		svn rm asterisk-$OLD_VERSION-patch.tar.gz
-		svn rm asterisk-$OLD_VERSION-patch.tar.gz.asc
-		svn rm asterisk-$BRANCH-current-patch.tar.gz
-		svn rm asterisk-$BRANCH-current-patch.tar.gz.asc
-		svn rm asterisk-$OLD_VERSION-summary.html
-		svn rm asterisk-$OLD_VERSION-summary.txt
-		svn rm asterisk-$BRANCH-current-summary.html
-		svn rm asterisk-$BRANCH-current-summary.txt
-		svn rm ChangeLog-$OLD_VERSION
-		svn rm README-$OLD_VERSION
-		svn rm ChangeLog-$BRANCH-current
-		svn rm README-$BRANCH-current
-		echo "Commiting to SVN."
-		sleep 3
-		svn commit -m "Removing links to Asterisk $OLD_VERSION and $BRANCH-current."
+		add_links $NEW_VERSION $BRANCH
+		commit_changes "add" "$NEW_VERSION and $BRANCH-current"
 
-		# Add files in
-		ln -s releases/asterisk-$NEW_VERSION.tar.gz ./asterisk-$BRANCH-current.tar.gz
-		ln -s releases/asterisk-$NEW_VERSION.tar.gz.asc ./asterisk-$BRANCH-current.tar.gz.asc
-		ln -s releases/asterisk-$NEW_VERSION.sha1 ./asterisk-$BRANCH-current.sha1
-		ln -s releases/asterisk-$NEW_VERSION.sha256 ./asterisk-$BRANCH-current.sha256
-		ln -s releases/asterisk-$NEW_VERSION.md5 ./asterisk-$BRANCH-current.md5
-		ln -s releases/asterisk-$NEW_VERSION-patch.tar.gz ./asterisk-$BRANCH-current-patch.tar.gz
-		ln -s releases/asterisk-$NEW_VERSION-patch.tar.gz.asc ./asterisk-$BRANCH-current-patch.tar.gz.asc
-		ln -s releases/README-$NEW_VERSION ./README-$BRANCH-current
-		ln -s releases/ChangeLog-$NEW_VERSION ./ChangeLog-$BRANCH-current
-		ln -s releases/asterisk-$NEW_VERSION-summary.html ./asterisk-$BRANCH-current-summary.html
-		ln -s releases/asterisk-$NEW_VERSION-summary.txt ./asterisk-$BRANCH-current-summary.txt
-		svn add *
-		echo "Committing to SVN."
-		sleep 3
-		svn commit -m "Adding links for Asterisk $NEW_VERSION and $BRANCH-current."
 	elif [ "$PROJECT" = "certified-asterisk" ]; then
-		cd ~/downloads/certified-asterisk-site
+		remove_links certified-$OLD_VERSION
+		remove_links certified-$BRANCH-current
+		commit_changes "remove" "certified-$OLD_VERSION and certified-$BRANCH-current"
 
-		# Remove old files
-		echo "Removing links to Certified Asterisk $OLD_VERSION and $BRANCH-current."
-		svn rm certified-asterisk-$OLD_VERSION.tar.gz
-		svn rm certified-asterisk-$OLD_VERSION.tar.gz.asc
-		svn rm certified-asterisk-$OLD_VERSION.tar.gz.sha1
-		svn rm certified-asterisk-$BRANCH-current.tar.gz
-		svn rm certified-asterisk-$BRANCH-current.tar.gz.asc
-		svn rm certified-asterisk-$BRANCH-current.sha1
-		svn rm certified-asterisk-$BRANCH-current.md5
-		svn rm certified-asterisk-$BRANCH-current.sha256
-		svn rm certified-asterisk-$OLD_VERSION-patch.tar.gz
-		svn rm certified-asterisk-$OLD_VERSION-patch.tar.gz.asc
-		svn rm certified-asterisk-$BRANCH-current-patch.tar.gz
-		svn rm certified-asterisk-$BRANCH-current-patch.tar.gz.asc
-		svn rm certified-asterisk-$OLD_VERSION-summary.html
-		svn rm certified-asterisk-$OLD_VERSION-summary.txt
-		svn rm certified-asterisk-$BRANCH-current-summary.html
-		svn rm certified-asterisk-$BRANCH-current-summary.txt
-		svn rm ChangeLog-$OLD_VERSION
-		svn rm README-$OLD_VERSION
-		svn rm ChangeLog-$BRANCH-current
-		svn rm README-$BRANCH-current
-		echo "Commiting to SVN."
-		sleep 3
-		svn commit -m "Removing links to Certified Asterisk $OLD_VERSION and $BRANCH-current."
+		add_links certified-$NEW_VERSION certified-$BRANCH
+		commit_changes "add" "certified-$NEW_VERSION and certified-$BRANCH-current"
 
-		# Add files in
-		ln -s releases/certified-asterisk-$NEW_VERSION.tar.gz ./certified-asterisk-$BRANCH-current.tar.gz
-		ln -s releases/certified-asterisk-$NEW_VERSION.tar.gz.asc ./certified-asterisk-$BRANCH-current.tar.gz.asc
-		ln -s releases/certified-asterisk-$NEW_VERSION.sha1 ./certified-asterisk-$BRANCH-current.sha1
-		ln -s releases/certified-asterisk-$NEW_VERSION.sha256 ./certified-asterisk-$BRANCH-current.sha256
-		ln -s releases/certified-asterisk-$NEW_VERSION.md5 ./certified-asterisk-$BRANCH-current.md5
-		ln -s releases/certified-asterisk-$NEW_VERSION-patch.tar.gz ./certified-asterisk-$BRANCH-current-patch.tar.gz
-		ln -s releases/certified-asterisk-$NEW_VERSION-patch.tar.gz.asc ./certified-asterisk-$BRANCH-current-patch.tar.gz.asc
-		ln -s releases/README-$NEW_VERSION ./README-$BRANCH-current
-		ln -s releases/ChangeLog-$NEW_VERSION ./ChangeLog-$BRANCH-current
-		ln -s releases/certified-asterisk-$NEW_VERSION-summary.html ./certified-asterisk-$BRANCH-current-summary.html
-		ln -s releases/certified-asterisk-$NEW_VERSION-summary.txt ./certified-asterisk-$BRANCH-current-summary.txt
-		svn add *
-		echo "Committing to SVN."
-		sleep 3
-		svn commit -m "Adding links for Certified Asterisk $NEW_VERSION and $BRANCH-current."
 	elif [ "$PROJECT" = "asterisk-addons" ]; then
 		cd ~/downloads/asterisk-site
 
@@ -166,47 +122,12 @@
 
 elif [ "$TYPE" = "RC" ]; then
 	if [ "$PROJECT" = "asterisk" ]; then
-		cd ~/downloads/asterisk-site
+		remove_links $OLD_VERSION
+		commit_changes "remove" "$OLD_VERSION"
 
-		echo "Removing links to Asterisk $OLD_VERSION."
-		svn rm asterisk-$OLD_VERSION.tar.gz
-		svn rm asterisk-$OLD_VERSION.tar.gz.asc
-		svn rm asterisk-$OLD_VERSION.sha1
-		svn rm asterisk-$OLD_VERSION.sha256
-		svn rm asterisk-$OLD_VERSION.md5
-		svn rm asterisk-$OLD_VERSION-patch.sha1
-		svn rm asterisk-$OLD_VERSION-patch.sha256
-		svn rm asterisk-$OLD_VERSION-patch.md5
-		svn rm asterisk-$OLD_VERSION-patch.tar.gz
-		svn rm asterisk-$OLD_VERSION-patch.tar.gz.asc
-		svn rm README-$OLD_VERSION
-		svn rm ChangeLog-$OLD_VERSION
-		svn rm asterisk-$OLD_VERSION-summary.html
-		svn rm asterisk-$OLD_VERSION-summary.txt
-		echo "Committing to SVN."
-		sleep 3
-		svn commit -m "Removing links to Asterisk $OLD_VERSION."
 	elif [ "$PROJECT" = "certified-asterisk" ]; then
-		cd ~/downloads/certified-asterisk-site
-
-		echo "Removing links to Certified Asterisk $OLD_VERSION."
-		svn rm certified-asterisk-$OLD_VERSION.tar.gz
-		svn rm certified-asterisk-$OLD_VERSION.tar.gz.asc
-		svn rm certified-asterisk-$OLD_VERSION.sha1
-		svn rm certified-asterisk-$OLD_VERSION.sha256
-		svn rm certified-asterisk-$OLD_VERSION.md5
-		svn rm certified-asterisk-$OLD_VERSION-patch.sha1
-		svn rm certified-asterisk-$OLD_VERSION-patch.sha256
-		svn rm certified-asterisk-$OLD_VERSION-patch.md5
-		svn rm certified-asterisk-$OLD_VERSION-patch.tar.gz
-		svn rm certified-asterisk-$OLD_VERSION-patch.tar.gz.asc
-		svn rm certified-asterisk-$OLD_VERSION-summary.html
-		svn rm certified-asterisk-$OLD_VERSION-summary.txt
-		svn rm README-$OLD_VERSION
-		svn rm ChangeLog-$OLD_VERSION
-		echo "Committing to SVN."
-		sleep 3
-		svn commit -m "Removing links to Certified Asterisk $OLD_VERSION."
+		remove_links certified-$OLD_VERSION
+		commit_changes "remove" "certified-$OLD_VERSION"
 	else
 		echo "Unrecognized project."
 	fi

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8cdad1f5fb193561dcbbedc783ef0d70143e4dd5
Gerrit-PatchSet: 2
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list