Skip to content

Commit

Permalink
Experimental no-TLS version
Browse files Browse the repository at this point in the history
Build a version without HTTPS support to support built-in HTTPS.
  • Loading branch information
ethomson committed Oct 8, 2018
1 parent adc7785 commit e4cffbb
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 29 deletions.
18 changes: 1 addition & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,6 @@ matrix:
dist: trusty
sudo: required
env: RID=linux-x64
- os: linux
dist: trusty
sudo: required
env: RID=rhel-x64
- os: linux
dist: trusty
sudo: required
env: RID=fedora-x64
- os: linux
dist: trusty
sudo: required
env: RID=debian.9-x64
- os: linux
dist: trusty
sudo: required
env: RID=alpine-x64
- os: osx
env: RID=osx

Expand All @@ -41,6 +25,6 @@ before_install:

install: true

script: if [[ $RID == "osx" ]]; then ./build.libgit2.sh ; else ./dockerbuild.sh ; fi
script: ./build.libgit2.sh

after_success: ./uploadbinaries.sh
6 changes: 3 additions & 3 deletions UpdateLibgit2ToSha.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#
.SYNOPSIS
Updates the libgit2 submodule to the specified commit and updates libgit2_hash.txt and NativeBinaries.props with the new hash value.
Updates the libgit2 submodule to the specified commit and updates libgit2_hash.txt and NativeBinaries.NoTLS.props with the new hash value.
.PARAMETER sha
Desired libgit2 version. This is run through `git rev-parse`, so branch names are okay too.
#>
Expand Down Expand Up @@ -101,7 +101,7 @@ Push-Location $libgit2Directory
</Project>
"@

Set-Content -Encoding UTF8 (Join-Path $projectDirectory "nuget.package\build\LibGit2Sharp.NativeBinaries.props") $buildProperties
Set-Content -Encoding UTF8 (Join-Path $projectDirectory "nuget.package\build\LibGit2Sharp.NativeBinaries.NoTLS.props") $buildProperties

$net461BuildProperties = @"
<Project>
Expand Down Expand Up @@ -160,7 +160,7 @@ Push-Location $libgit2Directory
</Project>
"@

Set-Content -Encoding UTF8 (Join-Path $projectDirectory "nuget.package\build\net461\LibGit2Sharp.NativeBinaries.props") $net461BuildProperties
Set-Content -Encoding UTF8 (Join-Path $projectDirectory "nuget.package\build\net461\LibGit2Sharp.NativeBinaries.NoTLS.props") $net461BuildProperties

$dllConfig = @"
<configuration>
Expand Down
2 changes: 2 additions & 0 deletions build.libgit2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ cmake -DCMAKE_BUILD_TYPE:STRING=Release \
-DENABLE_TRACE=ON \
-DLIBGIT2_FILENAME=git2-$SHORTSHA \
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
-DUSE_HTTPS=OFF \
-DCURL=OFF \
..
cmake --build .

Expand Down
2 changes: 1 addition & 1 deletion download.build.artifacts.and.package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Push-location "$($package.FullName).ext"
Remove-Item -Path ".\_rels\" -Recurse
Remove-Item -Path ".\package\" -Recurse
Remove-Item -Path '.\`[Content_Types`].xml'
& "$root/Nuget.exe" pack "LibGit2Sharp.NativeBinaries.nuspec" -OutputDirectory "$path" -NoPackageAnalysis -Verbosity "detailed"
& "$root/Nuget.exe" pack "LibGit2Sharp.NativeBinaries.NoTLS.nuspec" -OutputDirectory "$path" -NoPackageAnalysis -Verbosity "detailed"

$newPackage = Get-ChildItem -Path $path -Filter "*.nupkg"
Pop-Location
Expand Down
6 changes: 3 additions & 3 deletions nuget.package/NativeBinaries.nuspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>LibGit2Sharp.NativeBinaries</id>
<id>LibGit2Sharp.NativeBinaries.NoTLS</id>
<version>1.0.155</version>
<authors>LibGit2Sharp contributors</authors>
<owners>nulltoken</owners>
<owners>ethomson</owners>
<licenseUrl>https://raw.githubusercontent.com/libgit2/libgit2/master/COPYING</licenseUrl>
<projectUrl>https://github.com/libgit2/libgit2sharp.nativebinaries</projectUrl>
<iconUrl>https://raw.githubusercontent.com/libgit2/libgit2sharp/master/square-logo.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Native binaries for LibGit2Sharp</description>
<description>Native binaries for LibGit2Sharp: Experimental Builtin HTTPS Support</description>
</metadata>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="..\build\LibGit2Sharp.NativeBinaries.NoTLS.props" />
</Project>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Project>
<Import Project="..\..\build\net461\LibGit2Sharp.NativeBinaries.props" />
</Project>
<Import Project="..\..\build\net461\LibGit2Sharp.NativeBinaries.NoTLS.props" />
</Project>

0 comments on commit e4cffbb

Please sign in to comment.