Skip to content

Commit

Permalink
Merge pull request #203 from desktop/bump-for-win32-support
Browse files Browse the repository at this point in the history
upgrade native package and check for 32-bit Windows
  • Loading branch information
shiftkey authored Aug 13, 2018
2 parents 97cf270 + f6b9da8 commit e515fef
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ os: Visual Studio 2015

platform:
- x64
- x86

environment:
DUGITE_CACHE_DIR: '%USERPROFILE%\.dugite\'
matrix:
- nodejs_version: '8'
- nodejs_version: '10'
DUGITE_CACHE_DIR: '%USERPROFILE%\.dugite\'

cache:
- node_modules
Expand Down
12 changes: 10 additions & 2 deletions lib/git-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ function resolveGitExecPath(): string {
) {
return path.join(gitDir, 'libexec', 'git-core')
} else if (process.platform === 'win32') {
return path.join(gitDir, 'mingw64', 'libexec', 'git-core')
if (process.arch === 'x64') {
return path.join(gitDir, 'mingw64', 'libexec', 'git-core')
}

return path.join(gitDir, 'mingw32', 'libexec', 'git-core')
}

throw new Error('Git not supported on platform: ' + process.platform)
Expand All @@ -80,7 +84,11 @@ export function setupEnvironment(
const gitDir = resolveGitDir()

if (process.platform === 'win32') {
envPath = `${gitDir}\\mingw64\\bin;${gitDir}\\mingw64\\usr\\bin;${envPath}`
if (process.arch === 'x64') {
envPath = `${gitDir}\\mingw64\\bin;${gitDir}\\mingw64\\usr\\bin;${envPath}`
} else {
envPath = `${gitDir}\\mingw32\\bin;${gitDir}\\mingw32\\usr\\bin;${envPath}`
}
}

const env = Object.assign(
Expand Down
24 changes: 15 additions & 9 deletions script/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,28 @@ function getConfig() {
}

if (process.platform === 'darwin') {
config.checksum = '9856da255c89ab4954bd336f8b7e757babf6f8ec6c15d5b594b002440834b779'
config.checksum = 'e95eefd33c8305aa4b362fe76d4a499cd7c1f11ff3183fc10009317466bc309f'
config.source =
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-3/dugite-native-v2.18.0-macOS.tar.gz'
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-4/dugite-native-v2.18.0-macOS.tar.gz'
} else if (process.platform === 'win32') {
config.checksum = 'a29d099b4463d43ca056beb0dbbfc1b7cccf894c13812fb0c65227cb1289e78b'
config.source =
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-3/dugite-native-v2.18.0-win32.tar.gz'
if (os.arch() === 'x64') {
config.checksum = '186cba377cbb7f2bb0d0061ccdd9ddc12c7acc8381a2f56e3c59952a1ecc09a9'
config.source =
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-4/dugite-native-v2.18.0-windows-x64.tar.gz'
} else {
config.checksum = '680769787069722f283bf0e5f0acaed37c049bbe81a27ebda6fa4b9b8ffe86d1'
config.source =
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-4/dugite-native-v2.18.0-windows-x86.tar.gz'
}
} else if (process.platform === 'linux') {
if (os.arch() === 'arm64') {
config.checksum = 'be04e349f1cf842e5794e094ef11012e4837996ec334fc68a7c3efe9f320818a'
config.checksum = '5182bc8660ec3052d9ae05ee209f95a567eed30d7c6c60920c25ca68ce6f032b'
config.source =
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-3/dugite-native-v2.18.0-arm64.tar.gz'
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-4/dugite-native-v2.18.0-arm64.tar.gz'
} else {
config.checksum = 'e6405a1ab0e39a265526c95a14bb780d9b694ce612d526f695529416451b53b7'
config.checksum = '8eb1468bd10927229c7adbc41e0dec2b0f1fdbd0605fda9194cca028b35d52b1'
config.source =
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-3/dugite-native-v2.18.0-ubuntu.tar.gz'
'https://github.com/desktop/dugite-native/releases/download/v2.18.0-4/dugite-native-v2.18.0-ubuntu.tar.gz'
}
}

Expand Down

0 comments on commit e515fef

Please sign in to comment.