Skip to content

Commit 1264f23

Browse files
authored
Merge pull request #132 from microsoft/master
Cut release fixing Bitbucket bug and 32-bit Windows support
2 parents b11949c + 86290d7 commit 1264f23

File tree

8 files changed

+21
-16
lines changed

8 files changed

+21
-16
lines changed

.azure-pipelines/templates/windows/pack.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ steps:
77

88
- script: |
99
xcopy "out\windows\Installer.Windows\bin\$(configuration)\net461" "$(Build.StagingDirectory)\publish\"
10-
xcopy "out\windows\Payload.Windows\bin\$(configuration)\net461\win-x64" "$(Build.StagingDirectory)\publish\payload\"
10+
xcopy "out\windows\Payload.Windows\bin\$(configuration)\net461\win-x86" "$(Build.StagingDirectory)\publish\payload\"
1111
mkdir "$(Build.StagingDirectory)\publish\payload.sym\"
1212
move "$(Build.StagingDirectory)\publish\payload\*.pdb" "$(Build.StagingDirectory)\publish\payload.sym\"
1313
displayName: Prepare final build artifacts
@@ -18,7 +18,7 @@ steps:
1818
rootFolderOrFile: '$(Build.StagingDirectory)\publish\payload\'
1919
includeRootFolder: false
2020
archiveType: 'zip'
21-
archiveFile: '$(Build.StagingDirectory)\publish\gcmcore-win-x64-$(GitBuildVersion).zip'
21+
archiveFile: '$(Build.StagingDirectory)\publish\gcmcore-win-x86-$(GitBuildVersion).zip'
2222
replaceExistingArchive: true
2323

2424
- task: ArchiveFiles@2
@@ -27,7 +27,7 @@ steps:
2727
rootFolderOrFile: '$(Build.StagingDirectory)\publish\payload.sym\'
2828
includeRootFolder: false
2929
archiveType: 'zip'
30-
archiveFile: '$(Build.StagingDirectory)\publish\symbols-win-x64.zip'
30+
archiveFile: '$(Build.StagingDirectory)\publish\symbols-win-x86.zip'
3131
replaceExistingArchive: true
3232

3333
- task: PublishPipelineArtifact@0

.github/workflows/release-homebrew.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,19 @@ jobs:
1414
github-token: ${{secrets.GITHUB_TOKEN}}
1515
result-encoding: string
1616
script: |
17-
const { data } = await github.repos.getReleaseByTag({
17+
const { data: releases } = await github.repos.listReleases({
1818
owner: context.repo.owner,
19-
repo: context.repo.repo,
20-
tag: process.env.GITHUB_REF
19+
repo: context.repo.repo
2120
});
21+
const release = releases.find(x => x.tag_name === process.env.GITHUB_REF);
22+
if (!release) {
23+
throw new Error(`unable to find release with tag '${process.env.GITHUB_REF}'`);
24+
}
2225
const regex = /gcmcore-osx-(.*)\.pkg/;
23-
const asset = data.assets.find(x => regex.test(x.name));
26+
const asset = release.assets.find(x => regex.test(x.name));
27+
if (!asset) {
28+
throw new Error(`unable to find asset matching '${regex}'`);
29+
}
2430
const matches = asset.name.match(regex);
2531
const version = matches[1];
2632
return version;

docs/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ msbuild /p:Configuration=WindowsDebug
3737

3838
You can find a copy of the installer .exe file in `out\windows\Installer.Windows\bin\Debug\net461`.
3939

40-
The flat binaries can also be found in `out\windows\Payload.Windows\bin\Debug\net461\win-x64`.
40+
The flat binaries can also be found in `out\windows\Payload.Windows\bin\Debug\net461\win-x86`.
4141

4242
### Linux
4343

src/shared/Atlassian.Bitbucket/BitbucketRestApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public async Task<RestApiResult<UserInfo>> GetUserInformationAsync(string userNa
8080

8181
if (response.IsSuccessStatusCode)
8282
{
83-
var obj = JsonConvert.DeserializeObject<UserInfo>(json);
83+
var obj = JsonConvert.DeserializeObject<UserInfo>(json, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
8484

8585
return new RestApiResult<UserInfo>(response.StatusCode, obj);
8686
}

src/shared/Git-Credential-Manager/Git-Credential-Manager.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<OutputType>Exe</OutputType>
55
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
66
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net461;netcoreapp3.1</TargetFrameworks>
7-
<RuntimeIdentifiers>win-x64;osx-x64</RuntimeIdentifiers>
8-
<PlatformTarget>x64</PlatformTarget>
7+
<RuntimeIdentifiers>win-x86;osx-x64</RuntimeIdentifiers>
8+
<PlatformTarget Condition="'$(OSPlatform)'=='windows'">x86</PlatformTarget>
99
<AssemblyName>git-credential-manager-core</AssemblyName>
1010
<RootNamespace>Microsoft.Git.CredentialManager</RootNamespace>
1111
<ApplicationIcon>$(RepoAssetsPath)gcmicon.ico</ApplicationIcon>

src/windows/Installer.Windows/Installer.Windows.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<PropertyGroup>
66
<TargetFramework>net461</TargetFramework>
77
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
8-
<PayloadPath>$(PlatformOutPath)Payload.Windows\bin\$(Configuration)\net461\win-x64</PayloadPath>
8+
<PayloadPath>$(PlatformOutPath)Payload.Windows\bin\$(Configuration)\net461\win-x86</PayloadPath>
99
<EnableDefaultItems>false</EnableDefaultItems>
1010
</PropertyGroup>
1111

@@ -29,7 +29,7 @@
2929
before we attempt to sign any files or validate they exist. -->
3030
<Target Name="CreateFilesToSignItems" DependsOnTargets="GetBuildVersion" BeforeTargets="PrepareForRun">
3131
<ItemGroup>
32-
<FilesToSign Include="$(OutDir)gcmcore-win-x64-$(BuildVersion).exe">
32+
<FilesToSign Include="$(OutDir)gcmcore-win-x86-$(BuildVersion).exe">
3333
<Authenticode>Microsoft400</Authenticode>
3434
<InProject>false</InProject>
3535
</FilesToSign>

src/windows/Installer.Windows/Setup.iss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,12 @@ AppCopyright={#GcmCopyright}
4747
AppReadmeFile={#GcmReadme}
4848
VersionInfoVersion={#GcmVersion}
4949
LicenseFile={#GcmRepoRoot}\LICENSE
50-
OutputBaseFilename=gcmcore-win-x64-{#GcmVersion}
50+
OutputBaseFilename=gcmcore-win-x86-{#GcmVersion}
5151
DefaultDirName={pf}\{#GcmName}
5252
Compression=lzma2
5353
SolidCompression=yes
5454
MinVersion=6.1.7600
5555
DisableDirPage=yes
56-
ArchitecturesInstallIn64BitMode=x64
5756
UninstallDisplayIcon={app}\git-credential-manager-core.exe
5857
SetupIconFile={#GcmAssets}\gcmicon.ico
5958
WizardImageFile={#GcmAssets}\gcmicon128.bmp

src/windows/Payload.Windows/Payload.Windows.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<PropertyGroup>
66
<TargetFramework>net461</TargetFramework>
7-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
7+
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
88
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
99
</PropertyGroup>
1010

0 commit comments

Comments
 (0)