Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions templates/web.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,10 @@ run:
hook: code
cmd:
- sudo -H -E -u discourse git clean -f
# TODO Remove the special handling of shallow clones when everyone uses images without that clone type
- |-
sudo -H -E -u discourse bash -c '
set -o errexit
if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
git remote set-branches --add origin main
git remote set-branches origin $version
git fetch --depth 1 origin $version
else
git fetch --tags --prune-tags --prune --force origin
fi
'
- |-
sudo -H -E -u discourse bash -c '
set -o errexit
git fetch --tags --prune-tags --prune --force origin
if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then
git pull
else
Expand Down