From 34204561dfd132d5955648d657ded192f08df851 Mon Sep 17 00:00:00 2001 From: Eric Theise Date: Mon, 8 Jul 2024 14:42:05 -0700 Subject: [PATCH] Part of https://github.com/OpenHistoricalMap/issues/issues/786, adjusting workflow. --- .github/workflows/ohm.upstream-sync.yml | 1 + scripts/upstream_sync.sh | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ohm.upstream-sync.yml b/.github/workflows/ohm.upstream-sync.yml index 6b44e082..450e4d2b 100644 --- a/.github/workflows/ohm.upstream-sync.yml +++ b/.github/workflows/ohm.upstream-sync.yml @@ -25,6 +25,7 @@ jobs: git config --global user.name "github-actions" git config --global user.email "github-actions@users.noreply.github.com" git remote add upstream "${UPSTREAM}" + git fetch upstream master - name: Make our script executable run: chmod +x ./scripts/upstream_sync.sh - name: Run sync script diff --git a/scripts/upstream_sync.sh b/scripts/upstream_sync.sh index 39346248..ce06e48a 100755 --- a/scripts/upstream_sync.sh +++ b/scripts/upstream_sync.sh @@ -1,13 +1,11 @@ #!/bin/bash -# -# -# +# As we enter this script we are on the `main` branch and have `get fetch`ed +# upstream/master. -git checkout main +git checkout master git branch -D the-sacrifice git checkout -b the-sacrifice -git fetch upstream master mkdir upstream for i in $(git ls-tree upstream/master --name-only); do