Skip to content

Commit

Permalink
Merge pull request #132 from microsoft/master
Browse files Browse the repository at this point in the history
Cut release fixing Bitbucket bug and 32-bit Windows support
  • Loading branch information
mjcheetham authored Jun 9, 2020
2 parents b11949c + 86290d7 commit 1264f23
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .azure-pipelines/templates/windows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ steps:

- script: |
xcopy "out\windows\Installer.Windows\bin\$(configuration)\net461" "$(Build.StagingDirectory)\publish\"
xcopy "out\windows\Payload.Windows\bin\$(configuration)\net461\win-x64" "$(Build.StagingDirectory)\publish\payload\"
xcopy "out\windows\Payload.Windows\bin\$(configuration)\net461\win-x86" "$(Build.StagingDirectory)\publish\payload\"
mkdir "$(Build.StagingDirectory)\publish\payload.sym\"
move "$(Build.StagingDirectory)\publish\payload\*.pdb" "$(Build.StagingDirectory)\publish\payload.sym\"
displayName: Prepare final build artifacts
Expand All @@ -18,7 +18,7 @@ steps:
rootFolderOrFile: '$(Build.StagingDirectory)\publish\payload\'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.StagingDirectory)\publish\gcmcore-win-x64-$(GitBuildVersion).zip'
archiveFile: '$(Build.StagingDirectory)\publish\gcmcore-win-x86-$(GitBuildVersion).zip'
replaceExistingArchive: true

- task: ArchiveFiles@2
Expand All @@ -27,7 +27,7 @@ steps:
rootFolderOrFile: '$(Build.StagingDirectory)\publish\payload.sym\'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.StagingDirectory)\publish\symbols-win-x64.zip'
archiveFile: '$(Build.StagingDirectory)\publish\symbols-win-x86.zip'
replaceExistingArchive: true

- task: PublishPipelineArtifact@0
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/release-homebrew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script: |
const { data } = await github.repos.getReleaseByTag({
const { data: releases } = await github.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
tag: process.env.GITHUB_REF
repo: context.repo.repo
});
const release = releases.find(x => x.tag_name === process.env.GITHUB_REF);
if (!release) {
throw new Error(`unable to find release with tag '${process.env.GITHUB_REF}'`);
}
const regex = /gcmcore-osx-(.*)\.pkg/;
const asset = data.assets.find(x => regex.test(x.name));
const asset = release.assets.find(x => regex.test(x.name));
if (!asset) {
throw new Error(`unable to find asset matching '${regex}'`);
}
const matches = asset.name.match(regex);
const version = matches[1];
return version;
Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ msbuild /p:Configuration=WindowsDebug

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

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

### Linux

Expand Down
2 changes: 1 addition & 1 deletion src/shared/Atlassian.Bitbucket/BitbucketRestApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public async Task<RestApiResult<UserInfo>> GetUserInformationAsync(string userNa

if (response.IsSuccessStatusCode)
{
var obj = JsonConvert.DeserializeObject<UserInfo>(json);
var obj = JsonConvert.DeserializeObject<UserInfo>(json, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });

return new RestApiResult<UserInfo>(response.StatusCode, obj);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net461;netcoreapp3.1</TargetFrameworks>
<RuntimeIdentifiers>win-x64;osx-x64</RuntimeIdentifiers>
<PlatformTarget>x64</PlatformTarget>
<RuntimeIdentifiers>win-x86;osx-x64</RuntimeIdentifiers>
<PlatformTarget Condition="'$(OSPlatform)'=='windows'">x86</PlatformTarget>
<AssemblyName>git-credential-manager-core</AssemblyName>
<RootNamespace>Microsoft.Git.CredentialManager</RootNamespace>
<ApplicationIcon>$(RepoAssetsPath)gcmicon.ico</ApplicationIcon>
Expand Down
4 changes: 2 additions & 2 deletions src/windows/Installer.Windows/Installer.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<PayloadPath>$(PlatformOutPath)Payload.Windows\bin\$(Configuration)\net461\win-x64</PayloadPath>
<PayloadPath>$(PlatformOutPath)Payload.Windows\bin\$(Configuration)\net461\win-x86</PayloadPath>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>

Expand All @@ -29,7 +29,7 @@
before we attempt to sign any files or validate they exist. -->
<Target Name="CreateFilesToSignItems" DependsOnTargets="GetBuildVersion" BeforeTargets="PrepareForRun">
<ItemGroup>
<FilesToSign Include="$(OutDir)gcmcore-win-x64-$(BuildVersion).exe">
<FilesToSign Include="$(OutDir)gcmcore-win-x86-$(BuildVersion).exe">
<Authenticode>Microsoft400</Authenticode>
<InProject>false</InProject>
</FilesToSign>
Expand Down
3 changes: 1 addition & 2 deletions src/windows/Installer.Windows/Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@ AppCopyright={#GcmCopyright}
AppReadmeFile={#GcmReadme}
VersionInfoVersion={#GcmVersion}
LicenseFile={#GcmRepoRoot}\LICENSE
OutputBaseFilename=gcmcore-win-x64-{#GcmVersion}
OutputBaseFilename=gcmcore-win-x86-{#GcmVersion}
DefaultDirName={pf}\{#GcmName}
Compression=lzma2
SolidCompression=yes
MinVersion=6.1.7600
DisableDirPage=yes
ArchitecturesInstallIn64BitMode=x64
UninstallDisplayIcon={app}\git-credential-manager-core.exe
SetupIconFile={#GcmAssets}\gcmicon.ico
WizardImageFile={#GcmAssets}\gcmicon128.bmp
Expand Down
2 changes: 1 addition & 1 deletion src/windows/Payload.Windows/Payload.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

Expand Down

0 comments on commit 1264f23

Please sign in to comment.