Skip to content

Commit

Permalink
bulletproof git-subrepo calling
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Feb 7, 2024
1 parent 86b2133 commit c8dbb92
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ jobs:
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: turbo-${{ github.job }}-${{ github.ref_name }}-

- name: Install Git-Subrepo
# https://github.com/ingydotnet/git-subrepo?tab=readme-ov-file#installation
shell: bash
run: |
source ./scripts/git-subrepo/.rc
echo "PATH:$PATH"
git-subrepo version
- name: Install Dependencies
run: pnpm install

Expand Down
7 changes: 7 additions & 0 deletions scripts/bin/git-subrepo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Re-install each run
# https://github.com/ingydotnet/git-subrepo?tab=readme-ov-file#installation
source "`dirname $0`/../git-subrepo/.rc"

git-subrepo "$@"
13 changes: 7 additions & 6 deletions scripts/src/meta/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ async function getSubrepoDirs(monorepoDir: string): Promise<string[]> {
}

async function getSubrepos(monorepoDir: string) {
console.log()
console.log('DEBUG: getSubrepos')
console.log(process.env.PATH)
console.log()

const s: string = await execCapture(['git-subrepo', 'status', '--all'], { cwd: monorepoDir })
const s: string = await execCapture([
joinPaths(monorepoDir, 'scripts/bin/git-subrepo.sh'),
'status',
'--all',
], {
cwd: monorepoDir
})

const sections = s.split(/^(?=\S)/m) // split by non-indented starting line
const subrepos = {} as any
Expand Down

0 comments on commit c8dbb92

Please sign in to comment.