You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some workflows require tags be enforced for builds rather than branch name. Adding this option enables those workflows to work:
git:
desc: "Pushes a directory to a git remote"summary: | Given a directory, pushes it to a git remote whilst maintaining a linear history with the remote. usage: task deploy:git directory="/tmp/release" branch=main remote="[email protected]:Lullabot/drainpipe.git" message="Initial commit" push=true" directory=<directory> A directory containing the files to be pushed branch=<branch> Name of the branch to push to e.g. "main" tag=<tag> Name of the tag to push remote=<remote> Git remote to push to message=<message> Commit message push=true (optional) Push to the remote repositorycmds:
- if [ ! -d {{ shellQuote (.directory | default "") }} ]; then echo "Please provide a path to a directory to deploy" && exit 1; fi
- if [ "" == {{ shellQuote (.branch | default "") }} ]; then echo "Please provide a branch to deploy to" && exit 1; fi
- if [ "" == {{ shellQuote (.remote | default "") }} ]; then echo "Please provide a remote git repository to push to" && exit 1; fi
- if [ "" == {{ shellQuote (.message | default "") }} ]; then echo "Please provide a commit message" && exit 1; fi
- | TMP_DIR=$(mktemp -d) (git clone --depth 1 --branch {{.branch}} {{.remote}} $TMP_DIR && cd $TMP_DIR) || true if [[ ! -d "$TMP_DIR/.git" ]]; then git clone --depth 1 {{.remote}} $TMP_DIR cd $TMP_DIR git checkout -b {{.branch}} fi mv $TMP_DIR/.git {{.directory}} cd {{.directory}} git checkout -B {{.branch}} git add -A git commit --quiet --message {{shellQuote .message}} --allow-empty if [ {{shellQuote (.push | default "true") }} == "true" ]; then git push origin {{.branch}} fi if [ {{shellQuote (.tag | default "") }} != "" ]; then git tag {{.tag}} git push --tags fi
The text was updated successfully, but these errors were encountered:
Yeah, this is more for an acquia site. We use tags and switching the refspec for the prod environment to do deploys. It makes more sense there than on Pantheon. Still, it would be nice if the task supported tags too.
Some workflows require tags be enforced for builds rather than branch name. Adding this option enables those workflows to work:
The text was updated successfully, but these errors were encountered: