Skip to content

Commit

Permalink
chore: update upstream docs & fix: divergent branches (#38)
Browse files Browse the repository at this point in the history
* chore: sync latest

* fix: git clone only, no pull (then checkout)

* latest
  • Loading branch information
Reecepbcups authored Nov 13, 2024
1 parent a98766b commit 62db4cb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 23 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/deploy-github-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/deploy-netlify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pr-verify-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions latest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cometbft": "978b84614992cb009b2e37500b6b3a598665a535",
"ibcgo": "02960e9ee204116583963251ca03f7d015c68c92",
"cometbft": "326c33080db1acb1ed49332e604b3847eacbf0ed",
"ibcgo": "083cfb17d1a4128809a523c5d352eba695b96dc0",
"onboarding": "0ac33a6c3020c482b820bc01341e61627b0c4cd2",
"cosmossdk": "2dfb1ad96e7afad18c3e7af7bb18589a4a2b8ca0",
"cosmossdkmain": "13c234f421e81f99870dfc22a85178aabd075ccb"
"cosmossdk": "b6672e0dd1e3b1b1a83b66c11d40ddca2904d01c",
"cosmossdkmain": "e74799e1c3c81355b72335d7e4885d3c2d3b1315"
}
7 changes: 6 additions & 1 deletion scripts/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 62db4cb

Please sign in to comment.