Skip to content

Update libgit2 to v1.1.0 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
6 commits merged into from
Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions .github/workflows/Build_and_publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,44 @@ name: Build and Deploy Packages
on:
push:
branches:
- master
- mendix/releases

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: 'Release'
NUPKG_VERSION: '1.101.11'

BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
runs-on: windows-latest
runs-on: windows-2019

steps:
# Checkout repo into build area
- uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

# install nbgv please check https://github.com/dotnet/Nerdbank.GitVersioning for more info about nbgv
- uses: dotnet/nbgv@master
id: nbgv

fetch-depth: 0 # avoid shallow clone so Nerdbank.GitVersioning can do its work.

# Build and deploy nuget package
# We include the GitHub package source so that we can reference current packages and also so that we can push to the package repo
- name: Build Project and Package
run: |
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/mendix/index.json" -UserName srv-LibGit2sharp-mendix -Password ${{ secrets.GHPACKAGESTOKEN }}
dotnet build -c Release
nuget pack .\mx_nuget.package\Mendix_package.nuspec -Version ${{ env.NUPKG_VERSION }} -NoPackageAnalysis
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name "GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }}
dotnet pack --configuration Release --output "mx_nuget" -p:PublicRelease=true LibGit2Sharp/LibGit2Sharp.csproj
shell: powershell #Keep as powershell and not pwsh

- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: nuget package
path: ${{ github.workspace }}/**/*.nupkg
path: ${{ github.workspace }}/**/*.nupkg

# After build we copy the binaries to package output folder
# Finally we pack and push the package to github packages
# Finally we pack and push the package to github packages
- name: Deploy Package
run: |
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/mendix/index.json" -UserName srv-LibGit2sharp-mendix -Password ${{ secrets.GHPACKAGESTOKEN }}
nuget push **/Mendix.LibGit2Sharp*.nupkg -Source "GitHub" -SkipDuplicate
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name "GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }}
dotnet nuget push "**/mx_nuget/Mendix.LibGit2Sharp*.nupkg" --source "GitHub" --skip-duplicate
shell: powershell #Keep as powershell and not pwsh

11 changes: 7 additions & 4 deletions LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<AssemblyOriginatorKeyFile>..\libgit2sharp.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup>
<PackageId>Mendix.LibGit2Sharp</PackageId>
</PropertyGroup>

<ItemGroup>
<CodeAnalysisDictionary Include="CustomDictionary.xml" />
<None Include="Core\Handles\Objects.tt">
Expand All @@ -29,7 +33,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="[1.101.10]" PrivateAssets="none" />
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="[1.110.1]" PrivateAssets="none" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.13" PrivateAssets="all" />
</ItemGroup>
Expand All @@ -39,9 +43,8 @@

<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<PackageIconUrl>https://github.com/libgit2/libgit2sharp/raw/$(GitCommitIdShort)/square-logo.png</PackageIconUrl>
<PackageReleaseNotes>https://github.com/libgit2/libgit2sharp/blob/$(GitCommitIdShort)/CHANGES.md#libgit2sharp-changes</PackageReleaseNotes>
<PackageLicenseUrl>https://github.com/libgit2/libgit2sharp/raw/$(GitCommitIdShort)/LICENSE.md</PackageLicenseUrl>
<PackageIconUrl>https://raw.githubusercontent.com/mendix/libgit2sharp/master/square-logo.png</PackageIconUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/mendix/libgit2sharp/master/LICENSE.md</PackageLicenseUrl>
</PropertyGroup>
</Target>

Expand Down
29 changes: 0 additions & 29 deletions mx_nuget.package/Mendix_package.nuspec

This file was deleted.

6 changes: 1 addition & 5 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "0.26.2",
"publicReleaseRefSpec": [
"^refs/heads/master$", // we release out of master
"^refs/heads/maint/v\\d+(?:\\.\\d+)?$" // and maint/vNN branches
],
"version": "1.110.1",
"cloudBuild": {
"buildNumber": {
"enabled": true
Expand Down