-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation directory structure was reworked.
HTML generated doc and md doc can coexist now in `docs` directory. All scripts related to release are now in ./travis/release directory The archives generated for releases on github exclude non-client code (CI build configuration and unit tests) Changed the way releases are handled. Documented steps to create new release.
- Loading branch information
Showing
36 changed files
with
183 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
|
||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.gitmodules export-ignore | ||
.travis.yml export-ignore | ||
|
||
.travis export-ignore | ||
|
||
^docs/* linguist-documentation | ||
.travis export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.gitmodules export-ignore | ||
.travis.yml export-ignore | ||
mkdocs.yml export-ignore | ||
tests export-ignore | ||
development export-ignore | ||
sonar-project.properties export-ignore | ||
^docs/* linguist-documentation |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,4 @@ | ||
#!/bin/bash | ||
# Change working directory to project root | ||
cd "${UTPLSQL_PROJECT_ROOT}" | ||
mkdocs build --clean --strict |
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,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
#inspired by: | ||
# https://github.com/travis-ci/travis-ci/issues/1476 | ||
# http://stackoverflow.com/questions/36915499/push-to-git-master-branch-from-travis-ci | ||
current_dir=`pwd` | ||
commit_message="${1}" | ||
|
||
cd "${UTPLSQL_PROJECT_ROOT}" | ||
|
||
git config --global user.email "builds@travis-ci.com" | ||
git config --global user.name "${UTPLSQL_BUILD_USER_NAME}" | ||
|
||
echo Adding new/modified/removed files | ||
git add --all . | ||
echo Commiting changes | ||
git commit --quiet -m "${commit_message}" | ||
echo Pushing | ||
|
||
# As suggested here: https://github.com/blog/1270-easier-builds-and-deployments-using-git-over-https-and-oauth | ||
# "To avoid writing tokens to disk, don't clone. Instead, just use the full git URL in your push/pull operations (with `.git` suffix)" | ||
git push --quiet https://${github_api_token}@github.com/${UTPLSQL_REPO}.git HEAD:${CURRENT_BRANCH} | ||
|
||
cd "${current_dir}" |
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,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
COMMIT_SHA=`git rev-parse HEAD` | ||
|
||
#github API documentation: https://developer.github.com/v3/repos/releases/#create-a-release | ||
#using https://stedolan.github.io/jq/ | ||
curl -H "Authorization: token ${github_api_token}" \ | ||
-X POST --data '{"name":"'${UTPLSQL_VERSION}'","tag_name":"'${UTPLSQL_VERSION}'","target_commitish":"'${COMMIT_SHA}'","prerelease":true' "https://api.github.com/repos/${UTPLSQL_REPO}/releases" |
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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd "${0%/*}" | ||
|
||
#Assumptions: | ||
# - update project version was executed using update_project_version.sh | ||
# - docs were build and committed using build_docs.sh | ||
|
||
echo Committing project version update and html docs | ||
. ./commit_and_push.sh "Updated project version (${UTPLSQL_VERSION}) and added html docs [skip ci]" | ||
|
||
echo Creating a release tag "${UTPLSQL_VERSION}" | ||
. ./create_tag.sh | ||
|
||
echo Preparing release branch for merge to develop | ||
echo Removing generated html doc | ||
rm -rf ${UTPLSQL_PROJECT_ROOT}/docs/html | ||
|
||
echo Committing html docs cleanup | ||
. ./commit_and_push.sh "Cleanup of release of version (${UTPLSQL_VERSION}) [skip ci]" |
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 @@ | ||
#Creating a release | ||
|
||
To build a new release from a branch of utPLSQL project do the following: | ||
|
||
- Decide on the version number to be created follow the [semantic versioning](http://semver.org/) | ||
- Create a new branch named in one of the following formats: | ||
- `release/vMAJOR.MINOR.PATCH` | ||
- `release/vMAJOR.MINOR.PATCH-alpha` | ||
- `release/vMAJOR.MINOR.PATCH-beta` | ||
- `release/vMAJOR.MINOR.PATCH-something` | ||
|
||
The naming convention is there to instruct Travis to do a release from build on that branch. | ||
|
||
Version to be built is extracted from the branch name. | ||
|
||
The list of project files to be excluded from a release is controlled by content of `.gitattributes` file. | ||
|
||
|
||
#The Release build | ||
|
||
Release build is performing all the activities of regular build and additionally dose the following: | ||
- Cleans the working copy | ||
- Updates all project files with new version number | ||
- Generates html documentation | ||
- Commits and pushes | ||
- Creates a release tag and publishes the release artifacts | ||
- Removes generated documentation | ||
- Commits and pushes | ||
|
||
|
||
#Post release tasks | ||
|
||
Once the release is published, it is recommended to merge it to the develop branch and delete it after. |
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
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 Update of sonar-project.properties sonar.projectVersion | ||
sed -i -r "s/(sonar\.projectVersion=).*?/\1${UTPLSQL_VERSION}/" sonar-project.properties | ||
echo Setting project version in VERSION file | ||
echo ${UTPLSQL_VERSION} > VERSION |
Oops, something went wrong.