adding awesome tag/commit pull feature by Jaesin @ github

This commit is contained in:
Ric Harvey
2018-06-19 10:56:24 +01:00
parent 1836953c43
commit 17c77147ea
2 changed files with 8 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ The following flags are a list of all the currently supported options that can b
|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| GIT_REPO | URL to the repository containing your source code. If you are using a personal token, this is the https URL without `https://` (e.g `github.com/project/`). For ssh prepend with `git@` (e.g `git@github.com/project.git`) |
| GIT_BRANCH | Select a specific branch (optional) |
| GIT_TAG | Specify a specific git tag (optional) |
| GIT_COMMIT | Specify a specific git commit (optional) |
| GIT_EMAIL | Set your email for code pushing (required for git to work) |
| GIT_NAME | Set your name for code pushing (required for git to work) |
| GIT_USE_SSH | Set this to 1 if you want to use git over SSH (instead of HTTP), useful if you want to use Bitbucket instead of GitHub |

View File

@@ -58,6 +58,12 @@ if [ ! -d "/var/www/html/.git" ]; then
fi
fi
${GIT_COMMAND} /var/www/html || exit 1
if [ ! -z "$GIT_TAG" ]; then
git checkout ${GIT_TAG} || exit 1
fi
if [ ! -z "$GIT_COMMIT" ]; then
git checkout ${GIT_COMMIT} || exit 1
fi
if [ -z "$SKIP_CHOWN" ]; then
chown -Rf nginx.nginx /var/www/html
fi