2016-02-23 21:35:25 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2016-07-02 10:24:32 +00:00
|
|
|
BRANCH_NAME=$(git branch | grep '\*' | sed 's/* //')
|
2016-02-24 10:46:57 +00:00
|
|
|
|
2016-07-02 13:18:53 +00:00
|
|
|
if [[ "$BRANCH_NAME" == 'staging' ]]; then
|
2016-02-24 10:26:05 +00:00
|
|
|
# Build new web documentation:
|
|
|
|
make build-gh-pages
|
2016-07-02 13:18:53 +00:00
|
|
|
|
2016-06-16 19:34:25 +00:00
|
|
|
# Compare script version and the latest tag:
|
2016-03-12 19:21:04 +00:00
|
|
|
NEWEST_TAG=$(git describe --abbrev=0 --tags)
|
2016-07-02 10:24:32 +00:00
|
|
|
SCRIPT_VERSION=$(bash "${PWD}/git-secret" --version)
|
2016-06-16 19:34:25 +00:00
|
|
|
|
2016-03-13 10:27:36 +00:00
|
|
|
if [[ "$NEWEST_TAG" != "v${SCRIPT_VERSION}" ]]; then
|
2016-06-16 19:34:25 +00:00
|
|
|
# Create new release:
|
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
|