mirror of
https://github.com/sobolevn/git-secret
synced 2024-11-18 15:26:58 +00:00
12d4b9f6de
Changes: 1. Removed any reference of `staging` branch from docs 2. Refactored `hooks` to work with master Closes #76
21 lines
533 B
Bash
Executable File
21 lines
533 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
BRANCH_NAME=$(git branch | grep '\*' | sed 's/* //')
|
|
|
|
if [[ "$BRANCH_NAME" == 'master' ]]; then
|
|
# Build new web documentation:
|
|
make build-gh-pages
|
|
|
|
# Compare script version and the latest tag:
|
|
NEWEST_TAG=$(git describe --abbrev=0 --tags)
|
|
SCRIPT_VERSION=$(bash "${PWD}/git-secret" --version)
|
|
|
|
if [[ "$NEWEST_TAG" != "v${SCRIPT_VERSION}" ]]; then
|
|
# Create new release:
|
|
git tag -a "v${SCRIPT_VERSION}" -m "version $SCRIPT_VERSION"
|
|
echo "Created new tag 'v${SCRIPT_VERSION}'"
|
|
fi
|
|
fi
|