| # ----------------------------------------------------------------------------- |
| # Builds an ONOS Yang Tools release |
| # ----------------------------------------------------------------------------- |
| echo "Usage: onos-yang-tools-build-release version next-version branch" |
| echo "For example, to build beta 2 on the master branch - onos-yang-tools-build-release 1.12-b2 1.12-SNAPSHOT master" |
| export OYT_TAG=$OYT_VERSION |
| ssh -p 29418 gerrit.onosproject.org projectlock lock onos-yang-tools $OYT_BRANCH |
| mvn versions:set -DnewVersion=$OYT_VERSION versions:commit |
| mvn -Prelease clean deploy |
| git commit -am"Releasing $OYT_VERSION" |
| git tag -sm"Tagging $OYT_VERSION" $OYT_VERSION |
| mvn versions:set -DnewVersion=$OYT_SNAPSHOT versions:commit |
| git commit -am"Bumping version to $OYT_SNAPSHOT" |
| git push origin $OYT_BRANCH |
| ssh -p 29418 gerrit.onosproject.org projectlock unlock onos-yang-tools $OYT_BRANCH |
| unset OYT_VERSION OYT_SNAPSHOT OYT_BRANCH OYT_TAG |