[Asterisk-code-review] Added libpri as a supported project (repotools[master])

Joshua Colp asteriskteam at digium.com
Tue Mar 29 10:57:40 CDT 2016


Joshua Colp has submitted this change and it was merged.

Change subject: Added libpri as a supported project
......................................................................


Added libpri as a supported project

Change-Id: I8e5ae4c0634da0b6d7190dba7b4288b03fd23d34
---
M releaser.sh
1 file changed, 57 insertions(+), 34 deletions(-)

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



diff --git a/releaser.sh b/releaser.sh
index 691402e..951dacf 100755
--- a/releaser.sh
+++ b/releaser.sh
@@ -24,52 +24,75 @@
 fi
 
 commit_changes () {
-    echo "Going to commit - \"$1 links for Asterisk $2\". Press any key to continue."
+    echo "Going to commit - \"$2 links for $1 $3\". Press any key to continue."
     read
-    svn commit -m "$1 links for asterisk-$2."
-    echo "Committed - $1 links for Asterisk $2."
+    svn commit -m "$2 links for $1-$3."
+    echo "Committed - $2 links for $1 $3."
 }
 
 remove_links () {
-    echo "Removing links to asterisk-$1."
-    find -maxdepth 1 -type l -name "asterisk-$1*" -exec svn rm {} \;
+    echo "Removing links to $1-$2."
+    find -maxdepth 1 -type l -name "$1-$2*" -exec svn rm {} \;
 
-    svn rm ChangeLog-$1*
-    svn rm README-$1*
+    svn rm ChangeLog-$2*
+    svn rm README-$2*
 }
 
 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*
+    echo "Adding current links for $1 $2."
+    if [ -z ${var+x} ]; then
+	ln -s releases/$1-$2.tar.gz ./$1-current.tar.gz
+	ln -s releases/$1-$2.tar.gz.asc ./$1-current.tar.gz.asc
+	ln -s releases/$1-$2.sha1 ./$1-current.sha1
+	ln -s releases/$1-$2.sha256 ./$1-current.sha256
+	ln -s releases/$1-$2.md5 ./$1-current.md5
+	ln -s releases/$1-$2-patch.tar.gz ./$1-current-patch.tar.gz
+	ln -s releases/$1-$2-patch.tar.gz.asc ./$1-current-patch.tar.gz.asc
+	ln -s releases/README-$2 ./README-current
+	ln -s releases/ChangeLog-$2 ./ChangeLog-current
+	ln -s releases/$1-$2-summary.html ./$1-current-summary.html
+	ln -s releases/$1-$2-summary.txt ./$1-current-summary.txt
+	svn add *-current*
+    else
+	ln -s releases/$1-$2.tar.gz ./$1-$3-current.tar.gz
+	ln -s releases/$1-$2.tar.gz.asc ./$1-$3-current.tar.gz.asc
+	ln -s releases/$1-$2.sha1 ./$1-$3-current.sha1
+	ln -s releases/$1-$2.sha256 ./$1-$3-current.sha256
+	ln -s releases/$1-$2.md5 ./$1-$3-current.md5
+	ln -s releases/$1-$2-patch.tar.gz ./$1-$3-current-patch.tar.gz
+	ln -s releases/$1-$2-patch.tar.gz.asc ./$1-$3-current-patch.tar.gz.asc
+	ln -s releases/README-$2 ./README-$3-current
+	ln -s releases/ChangeLog-$2 ./ChangeLog-$3-current
+	ln -s releases/$1-$2-summary.html ./$1-$3-current-summary.html
+	ln -s releases/$1-$2-summary.txt ./$1-$3-current-summary.txt
+	svn add *$3-current*
+    fi
 }
 
 if [ "$TYPE" = "release" ]; then
 	if [ "$PROJECT" = "asterisk" ]; then
-		remove_links $OLD_VERSION
-		remove_links $BRANCH-current
-		commit_changes "remove" "$OLD_VERSION and $BRANCH-current"
+		remove_links $PROJECT $OLD_VERSION
+		remove_links $PROJECT $BRANCH-current
+		commit_changes $PROJECT "remove" "$OLD_VERSION and $BRANCH-current"
 
-		add_links $NEW_VERSION $BRANCH
-		commit_changes "add" "$NEW_VERSION and $BRANCH-current"
+		add_links $PROJECT $NEW_VERSION $BRANCH
+		commit_changes $PROJECT "add" "$NEW_VERSION and $BRANCH-current"
 
 	elif [ "$PROJECT" = "certified-asterisk" ]; then
-		remove_links certified-$OLD_VERSION
-		remove_links certified-$BRANCH-current
-		commit_changes "remove" "certified-$OLD_VERSION and certified-$BRANCH-current"
+		remove_links asterisk certified-$OLD_VERSION
+		remove_links asterisk certified-$BRANCH-current
+		commit_changes asterisk "remove" "certified-$OLD_VERSION and certified-$BRANCH-current"
 
-		add_links certified-$NEW_VERSION certified-$BRANCH
-		commit_changes "add" "certified-$NEW_VERSION and certified-$BRANCH-current"
+		add_links asterisk certified-$NEW_VERSION certified-$BRANCH
+		commit_changes asterisk "add" "certified-$NEW_VERSION and certified-$BRANCH-current"
+
+	elif [ "$PROJECT" = "libpri" ]; then
+		remove_links $PROJECT $OLD_VERSION
+		remove_links $PROJECT current
+		commit_changes "" "remove" "$PROJECT-$OLD_VERSION and $PROJECT-current"
+
+		add_links $PROJECT $NEW_VERSION $BRANCH
+		commit_changes "" "add" "$PROJECT-$NEW_VERSION and $PROJECT-current"
 
 	elif [ "$PROJECT" = "asterisk-addons" ]; then
 		cd ~/downloads/asterisk-site
@@ -122,12 +145,12 @@
 
 elif [ "$TYPE" = "RC" ]; then
 	if [ "$PROJECT" = "asterisk" ]; then
-		remove_links $OLD_VERSION
-		commit_changes "remove" "$OLD_VERSION"
+		remove_links $PROJECT $OLD_VERSION
+		commit_changes $PROJECT "remove" "$OLD_VERSION"
 
 	elif [ "$PROJECT" = "certified-asterisk" ]; then
-		remove_links certified-$OLD_VERSION
-		commit_changes "remove" "certified-$OLD_VERSION"
+		remove_links asterisk certified-$OLD_VERSION
+		commit_changes asterisk "remove" "certified-$OLD_VERSION"
 	else
 		echo "Unrecognized project."
 	fi

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e5ae4c0634da0b6d7190dba7b4288b03fd23d34
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: Matthew Fredrickson <creslin at digium.com>



More information about the asterisk-code-review mailing list