diff options
author | Josh Suereth <joshua.suereth@gmail.com> | 2012-01-20 11:01:14 -0500 |
---|---|---|
committer | Josh Suereth <joshua.suereth@gmail.com> | 2012-01-20 11:01:14 -0500 |
commit | 6cc97445285b605330d001cfa971997ab78a463a (patch) | |
tree | f14a460b461aebfc000b9c7f37e5bc11c4e8b02d | |
parent | 58cb15c40dc431e45eaa0a5278874d9996e42104 (diff) | |
download | scala-6cc97445285b605330d001cfa971997ab78a463a.tar.gz scala-6cc97445285b605330d001cfa971997ab78a463a.tar.bz2 scala-6cc97445285b605330d001cfa971997ab78a463a.zip |
Made the binary push script a bit friendlier for humans
-rwxr-xr-x | push-binary-libs.sh | 5 | ||||
-rwxr-xr-x | tools/binary-repo-lib.sh | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/push-binary-libs.sh b/push-binary-libs.sh index 7592fc767a..0a1c62a1db 100755 --- a/push-binary-libs.sh +++ b/push-binary-libs.sh @@ -4,5 +4,10 @@ . $(dirname $0)/tools/binary-repo-lib.sh +if test $# -lt 2; then + echo "Usage: $0 <username> <password>" + exit 1 +fi + # TODO - Argument parsing for username/password. pushJarFiles $(pwd) $1 $2 diff --git a/tools/binary-repo-lib.sh b/tools/binary-repo-lib.sh index 79a37dd7df..4221e3205c 100755 --- a/tools/binary-repo-lib.sh +++ b/tools/binary-repo-lib.sh @@ -77,7 +77,7 @@ pushJarFile() { local remote_uri=${version}${jar#$basedir} echo " Pushing to ${remote_urlbase}/${remote_uri} ..." echo " $curl" - local curl=$(curlUpload $remote_uri $jar_name $user $pw) + curlUpload $remote_uri $jar_name $user $pw echo " Making new sha1 file ...." echo "$jar_sha1" > "${jar_name}${desired_ext}" popd >/dev/null @@ -112,14 +112,20 @@ pushJarFiles() { local password=$3 # TODO - ignore target/ and build/ local jarFiles="$(find ${basedir}/lib -name "*.jar") $(find ${basedir}/test/files -name "*.jar")" + local changed="no" for jar in $jarFiles; do local valid=$(isJarFileValid $jar) if [[ "$valid" != "OK" ]]; then echo "$jar has changed, pushing changes...." + changed="yes" pushJarFile $jar $basedir $user $password fi done - echo "Binary changes have been pushed. You may now submit the new *${desired_ext} files to git." + if test "$changed" == "no"; then + echo "No jars have been changed." + else + echo "Binary changes have been pushed. You may now submit the new *${desired_ext} files to git." + fi } # Pulls a single binary artifact from a remote repository. @@ -141,7 +147,7 @@ pullJarFile() { # Argument 1 - The directory to search for *.desired.sha1 files that need to be retrieved. pullJarFiles() { local basedir=$1 - local desiredFiles="$(find ${basedir}/lib -name *${desired_ext}) $(find ${basedir}/test/files -name *${desired_ext})" + local desiredFiles="$(find ${basedir}/lib -name *${desired_ext}) $(find ${basedir}/test/files -name *${desired_ext}) $(find ${basedir}/tools -name *${desired_ext})" for sha in $desiredFiles; do jar=${sha%$desired_ext} local valid=$(isJarFileValid $jar) |