From 62db4cbce01fe753b93fbac3e2ad176b8282ec1b Mon Sep 17 00:00:00 2001 From: Reece Williams <31943163+Reecepbcups@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:16:14 +0400 Subject: [PATCH] chore: update upstream docs & fix: divergent branches (#38) * chore: sync latest * fix: git clone only, no pull (then checkout) * latest --- .github/workflows/deploy-github-pages.yaml | 7 ++----- .github/workflows/deploy-netlify.yaml | 7 ++----- .github/workflows/pr-verify-deployment.yaml | 3 --- Makefile | 6 +----- latest.json | 8 ++++---- scripts/helpers.sh | 7 ++++++- 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy-github-pages.yaml b/.github/workflows/deploy-github-pages.yaml index 5db0ccc12..87df517ce 100644 --- a/.github/workflows/deploy-github-pages.yaml +++ b/.github/workflows/deploy-github-pages.yaml @@ -26,11 +26,8 @@ jobs: node-version: 20 cache: npm - - name: Set git config for pull.ff only - run: git config --global pull.ff only - - - name: Clear old docs references - run: make fresh + # - name: Clear old docs references + # run: make fresh - name: 🤔 Sync latest Upstream run: make sync-docs diff --git a/.github/workflows/deploy-netlify.yaml b/.github/workflows/deploy-netlify.yaml index a86e1c8a4..661f68ca9 100644 --- a/.github/workflows/deploy-netlify.yaml +++ b/.github/workflows/deploy-netlify.yaml @@ -44,11 +44,8 @@ jobs: - name: Install Dependencies run: npm ci - - name: Set git config for pull.ff only - run: git config --global pull.ff only - - - name: Clear old docs references - run: make fresh + # - name: Clear old docs references + # run: make fresh - name: Sync latest Upstream run: make sync-docs diff --git a/.github/workflows/pr-verify-deployment.yaml b/.github/workflows/pr-verify-deployment.yaml index 221a48cea..bcab50bf4 100644 --- a/.github/workflows/pr-verify-deployment.yaml +++ b/.github/workflows/pr-verify-deployment.yaml @@ -19,9 +19,6 @@ jobs: node-version: 20 cache: npm - - name: Clear old docs references - run: make fresh - - name: pull docs from current latest run: make sync-docs diff --git a/Makefile b/Makefile index d3699a851..fc7864736 100644 --- a/Makefile +++ b/Makefile @@ -22,11 +22,7 @@ latest-commits: # this is used for deployments to main to not hit divergent branch issues. .PHONY: fresh fresh: - rm -rf ./dsource-cosmos-sdk/ - rm -rf ./dsource-cosmos-sdk-main/ - rm -rf ./dsource-ibc-go/ - rm -rf ./dsource-onboarding/ - rm -rf ./dsource-cometbft/ + rm -rf ./dsource-*/ ## sync-docs: Grab the latest upstream documentation .PHONY: sync-docs diff --git a/latest.json b/latest.json index 1d14fa4b3..a7004f88e 100644 --- a/latest.json +++ b/latest.json @@ -1,7 +1,7 @@ { - "cometbft": "978b84614992cb009b2e37500b6b3a598665a535", - "ibcgo": "02960e9ee204116583963251ca03f7d015c68c92", + "cometbft": "326c33080db1acb1ed49332e604b3847eacbf0ed", + "ibcgo": "083cfb17d1a4128809a523c5d352eba695b96dc0", "onboarding": "0ac33a6c3020c482b820bc01341e61627b0c4cd2", - "cosmossdk": "2dfb1ad96e7afad18c3e7af7bb18589a4a2b8ca0", - "cosmossdkmain": "13c234f421e81f99870dfc22a85178aabd075ccb" + "cosmossdk": "b6672e0dd1e3b1b1a83b66c11d40ddca2904d01c", + "cosmossdkmain": "e74799e1c3c81355b72335d7e4885d3c2d3b1315" } diff --git a/scripts/helpers.sh b/scripts/helpers.sh index d9e1b53a3..d7220260a 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -101,6 +101,11 @@ download_repo() { fi loc="dsource-$1" - git -C "$loc" pull || git clone --depth 1 ${REPO_PAIRS[$1]} "$loc" + + if [ ! -d "$loc" ]; then + # no need to `git -C "$loc" pull` since the checkout commit will get us where we need to be + # else `You have divergent branches` occurs + git clone --depth 1 ${REPO_PAIRS[$1]} "$loc" + fi __checkout_commit "$loc" "$2" }