Skip to content

Commit

Permalink
Merge pull request #529 from theofficialgman/main
Browse files Browse the repository at this point in the history
simplify and correct arch detection
  • Loading branch information
sergiou87 committed Jul 9, 2023
2 parents 2671679 + d0d0e62 commit b0957f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
friendlyName: Windows
nodeVersion: 16
arch: x86
npm_config_arch: ia32
- os: ubuntu-22.04
friendlyName: Linux
timeout-minutes: 10
Expand All @@ -44,7 +45,7 @@ jobs:
- name: Install and build dependencies
run: yarn
env:
npm_config_arch: ${{ matrix.arch }}
npm_config_arch: ${{ matrix.npm_config_arch }}
- name: Build
run: yarn build
- name: Lint
Expand Down
6 changes: 1 addition & 5 deletions script/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function getConfig() {
tempFile: ''
}

// Possible values are ‘x64’, ‘arm’, ‘arm64’, ‘s390’, ‘s390x’, ‘mipsel’, ‘ia32’, ‘mips’, ‘ppc’ and ‘ppc64’
let arch = os.arch();

if (process.env.npm_config_arch) {
Expand All @@ -28,11 +29,6 @@ function getConfig() {
arch = 'ia32';
}

// Os.arch() calls it x32, we use x86 in actions, dugite-native calls it x86 and our embedded-git.json calls it ia32
if (arch === 'x32' || arch === 'x86') {
arch = 'ia32'
}

const key = `${process.platform}-${arch}`

const entry = embeddedGit[key]
Expand Down
2 changes: 1 addition & 1 deletion script/update-embedded-git.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ get(`https://api.github.com/repos/desktop/dugite-native/releases/latest`).then(
'darwin-x64': await findMacOSx64BitRelease(assets),
'darwin-arm64': await findMacOSARM64BitRelease(assets),
'linux-x64': await findLinux64BitRelease(assets),
'linux-x86': await findLinux32BitRelease(assets),
'linux-ia32': await findLinux32BitRelease(assets),
'linux-arm': await findLinuxARM32BitRelease(assets),
'linux-arm64': await findLinuxARM64BitRelease(assets)
}
Expand Down

0 comments on commit b0957f1

Please sign in to comment.