[vlma-devel] commit: Add a release script. (Adrien Grand )
git version control
git at videolan.org
Sat Apr 19 01:19:22 CEST 2008
vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sat Apr 19 01:16:20 2008 +0200| [66d022286a04b52bdaab283fcd7fdaeb649246a8]
Add a release script.
> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=66d022286a04b52bdaab283fcd7fdaeb649246a8
---
release.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/release.sh b/release.sh
new file mode 100755
index 0000000..c7b34cc
--- /dev/null
+++ b/release.sh
@@ -0,0 +1,47 @@
+# Release script
+# Usage: release.sh $VERSION
+# Should be replaced by the release plugin as soon as git is supported by the
+# maven SCM plugin.
+
+VERSION=$1
+POM=pom.xml
+POMS=$( find . -name pom.xml )
+
+if [ ! $VERSION ]
+then
+ echo "Usage:"
+ echo "./release.sh <version>"
+ exit 1
+fi
+
+echo "[INFO] Updating local repository"
+git pull --rebase
+if [ "$?" -ne 0 ]
+then
+ echo "[ERROR] Update failed failed."
+ exit 1
+fi
+echo "[INFO] Done."
+
+echo "[INFO] Updating version number..."
+# Assuming there are no snapshot dependencies except the VLMa, what should
+# always be the case.
+sed -i -e "s/<version>.*-SNAPSHOT<\/version>/<version>$VERSION<\/version>/g" $POMS
+echo "[INFO] Done."
+
+echo "[INFO] Packaging"
+mvn clean package
+if [ "$?" -ne 0 ]
+then
+ echo "[ERROR] Package generation failed."
+ exit 1
+fi
+echo "[INFO] Done."
+
+echo "[INFO] Now check everything is OK and run:"
+echo "[INFO] git tag -a -m \"VLMa Release $VERSION\" $VERSION"
+echo "[INFO] git push origin $VERSION"
+echo "[INFO] mvn site-deploy"
+echo "[INFO] Then upload jars."
+
+exit 0
More information about the vlma-devel
mailing list