Skip to content

Commit af6b216

Browse files
authoredSep 7, 2017
Merge pull request #32 from mazong1123/fix-21-add-nuget
Add Windows installer support.
2 parents c3725d8 + 93afb30 commit af6b216

7 files changed

+90
-1
lines changed
 

‎.travis.yml

+16
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,21 @@ dotnet: 2.0.0
1010
script:
1111
- chmod +x build.sh
1212
- chmod +x test.sh
13+
- chmod +x package.sh
1314
- ./build.sh
1415
- ./test.sh
16+
- ./package.sh
17+
18+
deploy:
19+
provider: releases
20+
api_key: $AUTH_TOKEN
21+
file:
22+
- "ubuntu.16.04-x64.tar.gz"
23+
- "centos.7-x64.tar.gz"
24+
- "debian.8-x64.tar.gz"
25+
- "fedora.24-x64.tar.gz"
26+
- "rhel.7-x64.tar.gz"
27+
- "osx.10.12-x64.tar.gz"
28+
skip_cleanup: true
29+
on:
30+
tags: true

‎package.cmd

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"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
2+
"C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" svn2gitnet-x64.wxs
3+
"C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe" -b ".\src\bin\Release\netcoreapp2.0\win10-x64\publish" .\svn2gitnet-x64.wixobj
4+
5+
"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
6+
"C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" svn2gitnet-x86.wxs
7+
"C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe" -b ".\src\bin\Release\netcoreapp2.0\win10-x86\publish" .\svn2gitnet-x86.wixobj

‎package.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
tar -zcvf ubuntu.16.04-x64.tar.gz ./src/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish
6+
tar -zcvf centos.7-x64.tar.gz ./src/bin/Release/netcoreapp2.0/centos.7-x64/publish
7+
tar -zcvf debian.8-x64.tar.gz ./src/bin/Release/netcoreapp2.0/debian.8-x64/publish
8+
tar -zcvf fedora.24-x64.tar.gz ./src/bin/Release/netcoreapp2.0/fedora.24-x64/publish
9+
tar -zcvf rhel.7-x64.tar.gz ./src/bin/Release/netcoreapp2.0/rhel.7-x64/publish
10+
tar -zcvf osx.10.12-x64.tar.gz ./src/bin/Release/netcoreapp2.0/osx.10.12-x64/publish

‎publish.cmd

+3
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ if %errorlevel% neq 0 exit %errorlevel%
77
dotnet publish --self-contained -c Release -r win10-x64
88
if %errorlevel% neq 0 exit %errorlevel%
99

10+
dotnet publish --self-contained -c Release -r win10-x86
11+
if %errorlevel% neq 0 exit %errorlevel%
12+
1013
cd ..
1114
if %errorlevel% neq 0 exit %errorlevel%

‎publish.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ set -e
55
cd src
66
dotnet restore
77
dotnet publish --self-contained -c Release -r ubuntu.16.04-x64
8-
dotnet publish --self-contained -c Release -r ubuntu.15.10-x64
8+
dotnet publish --self-contained -c Release -r centos.7-x64
9+
dotnet publish --self-contained -c Release -r debian.8-x64
10+
dotnet publish --self-contained -c Release -r fedora.24-x64
11+
dotnet publish --self-contained -c Release -r rhel.7-x64
12+
dotnet publish --self-contained -c Release -r osx.10.12-x64
913
cd ..

‎src/svn2gitnet.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
<OutputType>Exe</OutputType>
44
<TargetFramework>netcoreapp2.0</TargetFramework>
55
<RootNamespace>Svn2GitNet</RootNamespace>
6+
<Version>1.0.0-preview</Version>
7+
<Authors>Jingyu Ma</Authors>
8+
<Company>Jingyu Ma</Company>
9+
<Product>Svn2Git.NET</Product>
610
</PropertyGroup>
711
<ItemGroup>
812
<PackageReference Include="CommandLineParser" Version="2.1.1-beta" />

‎svn2gitnet.xslt

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<xsl:transform version="1.0"
2+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3+
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
4+
5+
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
6+
7+
<xsl:template match="wix:Product/@Version">
8+
<xsl:attribute name="Version">1.0.0.0</xsl:attribute>
9+
</xsl:template>
10+
11+
<xsl:template match="wix:Product/@Manufacturer">
12+
<xsl:attribute name="Manufacturer">Jingyu Ma</xsl:attribute>
13+
</xsl:template>
14+
15+
<xsl:template match="wix:Product/@Name">
16+
<xsl:attribute name="Name">Svn2Git.NET</xsl:attribute>
17+
</xsl:template>
18+
19+
<xsl:template match="wix:Feature/@Title">
20+
<xsl:attribute name="Title">Svn2Git.NET.Main</xsl:attribute>
21+
</xsl:template>
22+
23+
<xsl:template match="wix:Product/wix:Directory/wix:Directory/@Id">
24+
<xsl:attribute name="Id">APPLICATIONROOTDIRECTORY</xsl:attribute>
25+
</xsl:template>
26+
27+
<xsl:template match="wix:Product/wix:Directory/wix:Directory/@Name">
28+
<xsl:attribute name="Name">Svn2Git.NET</xsl:attribute>
29+
</xsl:template>
30+
31+
<xsl:template match="wix:Product/wix:Directory/wix:Directory">
32+
<Directory Id="ProgramFilesFolder" xmlns="http://schemas.microsoft.com/wix/2006/wi">
33+
<xsl:copy>
34+
<xsl:apply-templates select="@*|node()" />
35+
</xsl:copy>
36+
</Directory>
37+
</xsl:template>
38+
39+
<xsl:template match="node() | @*">
40+
<xsl:copy>
41+
<xsl:apply-templates select="@* | node()"/>
42+
</xsl:copy>
43+
</xsl:template>
44+
45+
</xsl:transform>

0 commit comments

Comments
 (0)
Please sign in to comment.