Skip to content

Commit

Permalink
Merge pull request #32 from mazong1123/fix-21-add-nuget
Browse files Browse the repository at this point in the history
Add Windows installer support.
  • Loading branch information
mazong1123 authored Sep 7, 2017
2 parents c3725d8 + 93afb30 commit af6b216
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,21 @@ dotnet: 2.0.0
script:
- chmod +x build.sh
- chmod +x test.sh
- chmod +x package.sh
- ./build.sh
- ./test.sh
- ./package.sh

deploy:
provider: releases
api_key: $AUTH_TOKEN
file:
- "ubuntu.16.04-x64.tar.gz"
- "centos.7-x64.tar.gz"
- "debian.8-x64.tar.gz"
- "fedora.24-x64.tar.gz"
- "rhel.7-x64.tar.gz"
- "osx.10.12-x64.tar.gz"
skip_cleanup: true
on:
tags: true
7 changes: 7 additions & 0 deletions package.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"C:\Program Files (x86)\WiX Toolset v3.11\bin\heat.exe" dir ".\src\bin\Release\netcoreapp2.0\win10-x64\publish" -cg svn2gitnet -gg -sfrag -sreg -svb6 -template product -t svn2gitnet.xslt -out svn2gitnet-x64.wxs
"C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" svn2gitnet-x64.wxs
"C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe" -b ".\src\bin\Release\netcoreapp2.0\win10-x64\publish" .\svn2gitnet-x64.wixobj

"C:\Program Files (x86)\WiX Toolset v3.11\bin\heat.exe" dir ".\src\bin\Release\netcoreapp2.0\win10-x86\publish" -cg svn2gitnet -gg -sfrag -sreg -svb6 -template product -t svn2gitnet.xslt -out svn2gitnet-x86.wxs
"C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" svn2gitnet-x86.wxs
"C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe" -b ".\src\bin\Release\netcoreapp2.0\win10-x86\publish" .\svn2gitnet-x86.wixobj
10 changes: 10 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

tar -zcvf ubuntu.16.04-x64.tar.gz ./src/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish
tar -zcvf centos.7-x64.tar.gz ./src/bin/Release/netcoreapp2.0/centos.7-x64/publish
tar -zcvf debian.8-x64.tar.gz ./src/bin/Release/netcoreapp2.0/debian.8-x64/publish
tar -zcvf fedora.24-x64.tar.gz ./src/bin/Release/netcoreapp2.0/fedora.24-x64/publish
tar -zcvf rhel.7-x64.tar.gz ./src/bin/Release/netcoreapp2.0/rhel.7-x64/publish
tar -zcvf osx.10.12-x64.tar.gz ./src/bin/Release/netcoreapp2.0/osx.10.12-x64/publish
3 changes: 3 additions & 0 deletions publish.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ if %errorlevel% neq 0 exit %errorlevel%
dotnet publish --self-contained -c Release -r win10-x64
if %errorlevel% neq 0 exit %errorlevel%

dotnet publish --self-contained -c Release -r win10-x86
if %errorlevel% neq 0 exit %errorlevel%

cd ..
if %errorlevel% neq 0 exit %errorlevel%
6 changes: 5 additions & 1 deletion publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ set -e
cd src
dotnet restore
dotnet publish --self-contained -c Release -r ubuntu.16.04-x64
dotnet publish --self-contained -c Release -r ubuntu.15.10-x64
dotnet publish --self-contained -c Release -r centos.7-x64
dotnet publish --self-contained -c Release -r debian.8-x64
dotnet publish --self-contained -c Release -r fedora.24-x64
dotnet publish --self-contained -c Release -r rhel.7-x64
dotnet publish --self-contained -c Release -r osx.10.12-x64
cd ..
4 changes: 4 additions & 0 deletions src/svn2gitnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RootNamespace>Svn2GitNet</RootNamespace>
<Version>1.0.0-preview</Version>
<Authors>Jingyu Ma</Authors>
<Company>Jingyu Ma</Company>
<Product>Svn2Git.NET</Product>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.1.1-beta" />
Expand Down
45 changes: 45 additions & 0 deletions svn2gitnet.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">

<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

<xsl:template match="wix:Product/@Version">
<xsl:attribute name="Version">1.0.0.0</xsl:attribute>
</xsl:template>

<xsl:template match="wix:Product/@Manufacturer">
<xsl:attribute name="Manufacturer">Jingyu Ma</xsl:attribute>
</xsl:template>

<xsl:template match="wix:Product/@Name">
<xsl:attribute name="Name">Svn2Git.NET</xsl:attribute>
</xsl:template>

<xsl:template match="wix:Feature/@Title">
<xsl:attribute name="Title">Svn2Git.NET.Main</xsl:attribute>
</xsl:template>

<xsl:template match="wix:Product/wix:Directory/wix:Directory/@Id">
<xsl:attribute name="Id">APPLICATIONROOTDIRECTORY</xsl:attribute>
</xsl:template>

<xsl:template match="wix:Product/wix:Directory/wix:Directory/@Name">
<xsl:attribute name="Name">Svn2Git.NET</xsl:attribute>
</xsl:template>

<xsl:template match="wix:Product/wix:Directory/wix:Directory">
<Directory Id="ProgramFilesFolder" xmlns="http://schemas.microsoft.com/wix/2006/wi">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</Directory>
</xsl:template>

<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

</xsl:transform>

0 comments on commit af6b216

Please sign in to comment.