Permalink
Browse files

Add a script for setting the version for guava and guava-android.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154560774
  • Loading branch information...
cgdecker authored and cpovirk committed Apr 28, 2017
1 parent f35bb61 commit f92fbe4e0eeacbfc1eb947acab04760f9adeb7f5
Showing with 20 additions and 0 deletions.
  1. +20 −0 util/set_version.sh
View
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -eu
+
+if (( $# != 1 )); then
+ echo "Usage: set_versions.sh <version>" >&2
+ exit 1
+fi
+
+version="$1"
+if [[ "${version}" =~ ^(.+)-SNAPSHOT$ ]]; then
+ android_version="${BASH_REMATCH[1]}-android-SNAPSHOT"
+else
+ android_version="${version}-android"
+fi
+
+mvn versions:set versions:commit -DnewVersion="${version}"
+mvn versions:set versions:commit -DnewVersion="${android_version}" \
+ -f android
+git commit -am "Set version numbers to ${version}"

0 comments on commit f92fbe4

Please sign in to comment.