| # ----------------------------------------------------------------------------- |
| # Build and publish the ONOS version of buck. |
| # ----------------------------------------------------------------------------- |
| if [ $# -ne 3 -a $# -ne 4 ]; then |
| echo "Usage: buck-publish-setup buck-branch onos-branch yang-branch [version] [--dry-run]" |
| echo "For example, to build buck branch 11-11-2016, onos branch master, and onos-yang-tools master:" |
| echo "buck-publish 11-11-2016 master master" |
| if [ $# -eq 4 -a "${4}" != "--dry-run" ]; then |
| echo "$4 is an invalid parameter - only --dry-run allowed" |
| onos-release-prerequisites |
| DIR=$(mktemp -d /tmp/buck-publish.XXXXX) || { echo "Failed to create temp file"; exit 1; } |
| buck-publish-setup $BUCK_BRANCH $ONOS_BRANCH $YANG_BRANCH $DIR |
| pushd $DIR && buck-publish-package $4 && popd |