-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
100 additions
and
31 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
#If building a new version from a release branch - then version is taken from release branch name | ||
if [[ "${CURRENT_BRANCH}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then | ||
version=${CURRENT_BRANCH#release\/} | ||
version=`sed -r "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)/\1\2\3\.${UTPLSQL_BUILD_NO}\4/" <<< "${version}"` | ||
echo ${version} > VERSION | ||
else | ||
version=`cat VERSION` | ||
fi | ||
echo ${version} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo Current branch is "${CURRENT_BRANCH}" | ||
|
||
last_commit_user=`git log -1 --format=%an` | ||
if [[ "${last_commit_user}" != "${UTPLSQL_BUILD_USER_NAME}" ]]; then | ||
if [[ "${CURRENT_BRANCH}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then | ||
echo Updating version in project source files | ||
find ${UTPLSQL_SOURCES_DIR} -type f -name '*' -exec sed -i -r "s/(${UTPLSQL_VERSION_PLACEHOLDER} )[^']*(')?/\1${UTPLSQL_VERSION}\2/" {} \; | ||
echo Source files updated with version tag: $UTPLSQL_FULL_VERSION | ||
|
||
echo Update of sonar-project.properties sonar.projectVersion | ||
sed -i -r "s/(sonar\.projectVersion=).*?/\1${UTPLSQL_VERSION}/" sonar-project.properties | ||
echo ${UTPLSQL_VERSION} > VERSION | ||
|
||
#inspired by: | ||
# https://github.com/travis-ci/travis-ci/issues/1476 | ||
# http://stackoverflow.com/questions/36915499/push-to-git-master-branch-from-travis-ci | ||
git config --global user.email "builds@travis-ci.com" | ||
git config --global user.name "${UTPLSQL_BUILD_USER_NAME}" | ||
|
||
git add . | ||
git commit -m 'Updated project version after building a release' | ||
echo pushing | ||
git push --quiet https://${github_api_token}@github.com/${UTPLSQL_REPO} HEAD:${CURRENT_BRANCH} | ||
echo Creating tag | ||
git tag ${UTPLSQL_VERSION} -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER" | ||
echo pushing tag | ||
git push --quiet https://${github_api_token}@github.com/${UTPLSQL_REPO} ${UTPLSQL_VERSION} | ||
else | ||
echo Not on a release branch, skipping project version update | ||
fi | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v3.0.0-alpha2 |
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
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
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
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
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
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
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