Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MODULES="../../$JOB_NAME/modules"
- TARGET="./"
- COMMIT="$(git rev-parse HEAD)"
- BRANCHES="$(for branch in $(git branch -a | grep -v "(no branch)" | cut -c 3-); do [ "$(git rev-parse $branch)" == "$(git rev-parse HEAD)" ] && echo "$(basename $branch)"; done | uniq -u)"
- cd "$HUDSON_HOME/jobs/public/$JOB_NAME"
- for modulepath in $(ls -d $MODULES/*/); do
- buildspath="${modulepath}builds"
- builddate="$(ls $buildspath | sort -r | head -n 1)"
- buildpath="$buildspath/$builddate"
- for file in $(find $buildpath -name '*.zip'); do
- filename="$(basename $file)"
- relativepath="../../builds/$JOB_NAME${file#$buildspath}"
- ln -sf "$relativepath" "$TARGET$filename"
- for branch in $BRANCHES; do
- ln -sf "$relativepath" "$TARGET$JOB_NAME-$branch-bin.zip"
- done
- done
- done
Add Comment
Please, Sign In to add comment