Lines Matching +full:dry +full:- +full:run
2 set -o errexit
16 if [ -n "$GIT_NAME" ]; then _ git config user.name "$GIT_NAME"; fi
17 if [ -n "$GIT_EMAIL" ]; then _ git config user.email "$GIT_EMAIL"; fi
21 run() { function
22 if [ ! -d "$source" ]; then
27 local tmpdir="$(mktemp -d)"
32 _ git checkout -b "$branch"
35 _ git add -A .
37 git_push --force
40 _ git clone "$repo" . -b "$branch" || ( \
42 _ git checkout -b "$branch")
43 if [[ "$keep" == "0" ]]; then _ rm -rf ./*; fi
46 _ git add -A .
50 _ rm -rf "$tmpdir"
55 if [ -z "$author" ]; then
56 _ git commit -m "$message"
58 _ git commit -m "$message" --author "$author"
63 if [ -z "$GITHUB_TOKEN" ]; then
68 --quiet >/dev/null 2>&1 || \
74 echo -e "\n\033[34m==>\033[0;1m" "$@\033[0m"
77 echo -e "\033[33;1m==>\033[0m" "$@"
93 echo " SOURCE path to upload to repository's gh-pages branch"
96 echo ' -h, --help show help screen'
97 echo ' -f, --force force push'
98 echo ' -n, --dry-run run in simulation mode'
99 echo ' -e, --use-env pick up arguments from environment variables'
100 echo ' -b, --branch use this branch name (default: gh-pages)'
101 echo ' -a, --author set the author'
102 echo ' -k, --keep keep existing files in the repo'
108 echo " Run with '-e' to enable the use of these variables."
113 echo ' GIT_BRANCH use this branch name (--branch)'
117 echo " # pushes './doc' into the gh-pages branch of rstacruz/myproject"
121 echo " $cmd -e"
122 echo " # pushes './doc' into the gh-pages branch of xyz/abc"
143 while [[ "$1" =~ ^- && ! "$1" == '--' ]]; do case $1 in
144 -h | --help )
148 -b | --branch )
152 -n | --dry-run )
155 -e | --use-env )
158 -k | --keep )
161 -a | --author)
165 -f | --force )
169 if [[ "$1" == '--' ]]; then shift; fi
171 if [[ "$useenv" == "1" ]] && [[ -n "$GIT_BRANCH" ]] && [[ -z "$branch" ]]; then
175 if [[ "$useenv" == "1" ]] && [[ -n "$GITHUB_REPO" ]] && [[ -n "$GIT_SOURCE" ]] && [[ -z "$2" ]]; th…
183 : ${branch:="gh-pages"}
185 if [ -z "$source" ]; then
190 source="`pwd -LP`/$source"
193 run