2016-02-23 21:35:25 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2016-02-24 10:46:57 +00:00
|
|
|
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
|
|
|
|
|
2016-03-13 11:07:30 +00:00
|
|
|
if [[ "$BRANCH_NAME" == 'develop' ]]; then
|
2016-02-24 10:26:05 +00:00
|
|
|
# Build new web documentation:
|
|
|
|
make build-gh-pages
|
2016-03-13 10:27:36 +00:00
|
|
|
fi
|
2016-03-12 19:21:04 +00:00
|
|
|
|
2016-03-13 11:07:30 +00:00
|
|
|
if [[ "$BRANCH_NAME" == 'staging' ]]; then
|
2016-03-12 19:21:04 +00:00
|
|
|
# create new release:
|
|
|
|
NEWEST_TAG=$(git describe --abbrev=0 --tags)
|
2016-03-13 10:10:45 +00:00
|
|
|
SCRIPT_VERSION=$(bash ${PWD}/git-secret --version)
|
2016-03-13 10:27:36 +00:00
|
|
|
if [[ "$NEWEST_TAG" != "v${SCRIPT_VERSION}" ]]; then
|
2016-03-13 11:07:30 +00:00
|
|
|
git tag -a "v${SCRIPT_VERSION}" -m "version $SCRIPT_VERSION"
|
|
|
|
fi
|
2016-02-24 10:26:05 +00:00
|
|
|
fi
|