mirror of
https://github.com/danbulant/api_docs
synced 2026-05-22 05:38:43 +00:00
Document --source-only and add --push-only
The `--source-only` already works to only build and not deploy. But sometimes we want to just push and not build. An example of that is when you want to use Docker to build the project, avoiding the installation of the whole Ruby environment in your computer. This commit adds `--push-only` to add the ability to execute only the actions related to `git` and avoid the project build. No API was broken by this commit, it's a minor change.
This commit is contained in:
parent
2e88f725fa
commit
1087f8bd69
1 changed files with 14 additions and 2 deletions
16
deploy.sh
16
deploy.sh
|
|
@ -15,9 +15,14 @@ Options:
|
|||
deploy branch.
|
||||
-n, --no-hash Don't append the source commit's hash to the deploy
|
||||
commit's message.
|
||||
--source-only Only build but not push
|
||||
--push-only Only push but not build
|
||||
"
|
||||
|
||||
bundle exec middleman build --clean
|
||||
|
||||
run_build() {
|
||||
bundle exec middleman build --clean
|
||||
}
|
||||
|
||||
parse_args() {
|
||||
# Set args from a local environment file.
|
||||
|
|
@ -200,4 +205,11 @@ sanitize() {
|
|||
"$@" 2> >(filter 1>&2) | filter
|
||||
}
|
||||
|
||||
[[ $1 = --source-only ]] || main "$@"
|
||||
if [[ $1 = --source-only ]]; then
|
||||
run_build
|
||||
elif [[ $1 = --push-only ]]; then
|
||||
main "$@"
|
||||
else
|
||||
run_build
|
||||
main "$@"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue