Last active
December 26, 2015 09:09
-
-
Save kmanna/7127085 to your computer and use it in GitHub Desktop.
Example Ivy promotion script to promote milestones to release builds without using Ant.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Example Ivy promotion script to promote milestones to release builds | |
# | |
ORG="$1" | |
MOD="$2" | |
OUT="./promote" | |
REV="latest.milestone" | |
IVY="~/.ant/lib/ivy-2.3.0.jar" | |
set -ex | |
rm -rf $OUT | |
# Fetch the last milestone | |
java -jar $IVY \ | |
-settings "$WS/common/ivysettings.xml" \ | |
-dependency "$ORG" "$MOD" "$REV" \ | |
-notransitive \ | |
-retrieve "$OUT/[revision]/[artifact].[ext]" \ | |
-ivypattern "$OUT/[revision]/[artifact].[ext]" | |
# What did we download? | |
MILESTONE=$(basename $(ls -d $OUT/*)) | |
# Prune the "-milestone" out of the version tag | |
RELEASE="${MILESTONE%-milestone}" | |
# Publish it back! | |
java -jar $IVY \ | |
-settings "$WS/common/ivysettings.xml" \ | |
-ivy "$OUT/$MILESTONE/ivy.xml" \ | |
-publish "local" \ | |
-publishpattern "$OUT/$MILESTONE/[artifact].[ext]" \ | |
-revision "$RELEASE" \ | |
-status "release" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment