Skip to content

Commit a81385e

Browse files
authored
Merge pull request #215 from ericnewton76/fix/issue-213-fsharp-dependency
hotfix/issue 213 fsharp dependency
2 parents a773ccd + 6e52805 commit a81385e

15 files changed

+371
-292
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ artifacts/*
3838
# Visual Studio 2015 cache/options directory
3939
.vs/
4040

41+
[R|r]elease/**

.paket/Paket.Restore.targets

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
1919
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
2020
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
21+
22+
<!-- .net core fdd -->
23+
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension>
24+
<PaketCommand Condition=" '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</PaketCommand>
25+
2126
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2227
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2328
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>

CommandLine.nuspec

+44-44
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3-
<metadata>
4-
<id>CommandLineParser</id>
5-
<version>$version$</version>
6-
<title>Command Line Parser Library</title>
7-
<authors>gsscoder nemec ericnewton76</authors>
8-
<description>Terse syntax C# command line parser for .NET with F# support. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.</description>
9-
<releaseNotes />
10-
<copyright>Copyright (c) 2005 - 2018 Giacomo Stelluti Scala &amp; Contributors</copyright>
11-
<licenseUrl>https://github.com/commandlineparser/commandline/blob/master/License.md</licenseUrl>
12-
<projectUrl>https://github.com/commandlineparser/commandline</projectUrl>
13-
<owners>Giacomo Stelluti Scala</owners>
14-
<iconUrl>https://raw.githubusercontent.com/commandlineparser/commandline/master/art/CommandLine20.png</iconUrl>
15-
<requireLicenseAcceptance>false</requireLicenseAcceptance>
16-
<tags>command line commandline argument option parser parsing library syntax shell</tags>
17-
<dependencies>
18-
<group targetFramework=".NETStandard1.5">
19-
<dependency id="System.Collections" version="4.0.11-rc2-24027" />
20-
<dependency id="System.Console" version="4.0.0-rc2-24027" />
21-
<dependency id="System.Diagnostics.Debug" version="4.0.11-rc2-24027" />
22-
<dependency id="System.Globalization" version="4.0.11-rc2-24027" />
23-
<dependency id="System.IO" version="4.1.0-rc2-24027" />
24-
<dependency id="System.Linq" version="4.1.0-rc2-24027" />
25-
<dependency id="System.Linq.Expressions" version="4.0.11-rc2-24027" />
26-
<dependency id="System.Reflection" version="4.1.0-rc2-24027" />
27-
<dependency id="System.Reflection.Extensions" version="4.0.1-rc2-24027" />
28-
<dependency id="System.Reflection.TypeExtensions" version="4.1.0-rc2-24027" />
29-
<dependency id="System.Resources.ResourceManager" version="4.0.1-rc2-24027" />
30-
<dependency id="System.Runtime" version="4.1.0-rc2-24027" />
31-
<dependency id="System.Runtime.Extensions" version="4.1.0-rc2-24027" />
32-
</group>
33-
</dependencies>
34-
</metadata>
35-
<files>
36-
<file src="build\CommandLine.dll" target="lib\net40\CommandLine.dll" />
37-
<file src="build\CommandLine.XML" target="lib\net40\CommandLine.XML" />
38-
<file src="build\CommandLine.dll" target="lib\net45\CommandLine.dll" />
39-
<file src="build\CommandLine.XML" target="lib\net45\CommandLine.XML" />
40-
<file src="build\netstandard1.5\CommandLine.dll" target="lib\netstandard1.5\CommandLine.dll" />
41-
<file src="build\CommandLine.XML" target="lib\netstandard1.5\CommandLine.xml" />
42-
<file src="readme.md" target="readme.md" />
43-
</files>
44-
</package>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>CommandLineParser</id>
5+
<version>$version$</version>
6+
<title>Command Line Parser Library</title>
7+
<authors>gsscoder nemec ericnewton76</authors>
8+
<description>Terse syntax C# command line parser for .NET. For FSharp support see CommandLineParser.FSharp. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.</description>
9+
<releaseNotes />
10+
<copyright>Copyright (c) 2005 - 2018 Giacomo Stelluti Scala &amp; Contributors</copyright>
11+
<licenseUrl>https://github.com/commandlineparser/commandline/blob/master/License.md</licenseUrl>
12+
<projectUrl>https://github.com/commandlineparser/commandline</projectUrl>
13+
<owners>Giacomo Stelluti Scala</owners>
14+
<iconUrl>https://raw.githubusercontent.com/commandlineparser/commandline/master/art/CommandLine20.png</iconUrl>
15+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
16+
<tags>command line commandline argument option parser parsing library syntax shell</tags>
17+
<dependencies>
18+
<group targetFramework=".NETStandard1.5">
19+
<dependency id="System.Collections" version="4.0.11-rc2-24027" />
20+
<dependency id="System.Console" version="4.0.0-rc2-24027" />
21+
<dependency id="System.Diagnostics.Debug" version="4.0.11-rc2-24027" />
22+
<dependency id="System.Globalization" version="4.0.11-rc2-24027" />
23+
<dependency id="System.IO" version="4.1.0-rc2-24027" />
24+
<dependency id="System.Linq" version="4.1.0-rc2-24027" />
25+
<dependency id="System.Linq.Expressions" version="4.0.11-rc2-24027" />
26+
<dependency id="System.Reflection" version="4.1.0-rc2-24027" />
27+
<dependency id="System.Reflection.Extensions" version="4.0.1-rc2-24027" />
28+
<dependency id="System.Reflection.TypeExtensions" version="4.1.0-rc2-24027" />
29+
<dependency id="System.Resources.ResourceManager" version="4.0.1-rc2-24027" />
30+
<dependency id="System.Runtime" version="4.1.0-rc2-24027" />
31+
<dependency id="System.Runtime.Extensions" version="4.1.0-rc2-24027" />
32+
</group>
33+
</dependencies>
34+
</metadata>
35+
<files>
36+
<file src="net4x\CommandLine.dll" target="lib\net40\CommandLine.dll" />
37+
<file src="net4x\CommandLine.XML" target="lib\net40\CommandLine.XML" />
38+
<file src="net4x\CommandLine.dll" target="lib\net45\CommandLine.dll" />
39+
<file src="net4x\CommandLine.XML" target="lib\net45\CommandLine.XML" />
40+
<file src="netstandard1.5\CommandLine.dll" target="lib\netstandard1.5\CommandLine.dll" />
41+
<file src="netstandard1.5\CommandLine.XML" target="lib\netstandard1.5\CommandLine.xml" />
42+
<file src="readme.md" target="readme.md" />
43+
</files>
44+
</package>

Commandline.FSharp.nuspec

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>CommandLineParser.FSharp</id>
5+
<version>$version$</version>
6+
<title>Command Line Parser Library</title>
7+
<authors>gsscoder nemec ericnewton76</authors>
8+
<description>Terse syntax C# command line parser for .NET with F# support. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.</description>
9+
<releaseNotes />
10+
<copyright>Copyright (c) 2005 - 2018 Giacomo Stelluti Scala &amp; Contributors</copyright>
11+
<licenseUrl>https://github.com/commandlineparser/commandline/blob/master/License.md</licenseUrl>
12+
<projectUrl>https://github.com/commandlineparser/commandline</projectUrl>
13+
<owners>Giacomo Stelluti Scala</owners>
14+
<iconUrl>https://raw.githubusercontent.com/commandlineparser/commandline/master/art/CommandLine20.png</iconUrl>
15+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
16+
<tags>command line commandline argument option parser parsing library syntax shell</tags>
17+
<dependencies>
18+
<group targetFramework=".NETStandard1.5">
19+
<dependency id="System.Collections" version="4.0.11-rc2-24027" />
20+
<dependency id="System.Console" version="4.0.0-rc2-24027" />
21+
<dependency id="System.Diagnostics.Debug" version="4.0.11-rc2-24027" />
22+
<dependency id="System.Globalization" version="4.0.11-rc2-24027" />
23+
<dependency id="System.IO" version="4.1.0-rc2-24027" />
24+
<dependency id="System.Linq" version="4.1.0-rc2-24027" />
25+
<dependency id="System.Linq.Expressions" version="4.0.11-rc2-24027" />
26+
<dependency id="System.Reflection" version="4.1.0-rc2-24027" />
27+
<dependency id="System.Reflection.Extensions" version="4.0.1-rc2-24027" />
28+
<dependency id="System.Reflection.TypeExtensions" version="4.1.0-rc2-24027" />
29+
<dependency id="System.Resources.ResourceManager" version="4.0.1-rc2-24027" />
30+
<dependency id="System.Runtime" version="4.1.0-rc2-24027" />
31+
<dependency id="System.Runtime.Extensions" version="4.1.0-rc2-24027" />
32+
</group>
33+
<group targetFramework="net40">
34+
<dependency id="FSharp.Core" version="4.0.0.1" />
35+
</group>
36+
<group targetFramework="net45">
37+
<dependency id="FSharp.Core" version="4.0.0.1" />
38+
</group>
39+
</dependencies>
40+
</metadata>
41+
<files>
42+
<file src="net4x\CommandLine.dll" target="lib\net40\CommandLine.dll" />
43+
<file src="net4x\CommandLine.XML" target="lib\net40\CommandLine.XML" />
44+
<file src="net4x\CommandLine.dll" target="lib\net45\CommandLine.dll" />
45+
<file src="net4x\CommandLine.XML" target="lib\net45\CommandLine.XML" />
46+
<file src="netstandard1.5\CommandLine.dll" target="lib\netstandard1.5\CommandLine.dll" />
47+
<file src="netstandard1.5\CommandLine.XML" target="lib\netstandard1.5\CommandLine.xml" />
48+
<file src="readme.md" target="readme.md" />
49+
</files>
50+
</package>

appveyor.yml

+25-8
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,44 @@ init:
2424
Update-AppveyorBuild -Version "$ver-$commit"
2525
}
2626
27+
#version patching
2728
assembly_info:
2829
file: src\SharedAssemblyInfo.cs
2930
patch: true
3031
assembly_version: '{version}'
3132
assembly_file_version: '{version}'
3233
assembly_informational_version: $(APPVEYOR_BUILD_VERSION)
34+
dotnet_csproj:
35+
patch: true
36+
file: '**\*.csproj'
37+
version: '{version}'
38+
package_version: '{version}'
39+
assembly_version: '{version}'
40+
file_version: '{version}'
41+
informational_version: '{version}'
42+
43+
44+
environment:
45+
matrix:
46+
- BUILD_TARGET: base
47+
NUSPEC_FILE: CommandLine
48+
- BUILD_TARGET: fsharp
49+
NUSPEC_FILE: CommandLine.FSharp
3350

3451
build_script:
35-
- cmd: build.cmd
52+
- cmd: build.cmd %BUILD_TARGET%
3653

3754
after_build:
3855
- ps: |
39-
get-childitem build\* -include *.dll | foreach-object { "{0}`t{1}" -f $_.Name, [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion }
56+
powershell get-childitem Release\* -include *.dll | foreach-object { "{0}`t{1}" -f $_.Path, [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion }
4057
41-
nuget pack CommandLine.nuspec -version "$env:APPVEYOR_BUILD_VERSION"
58+
.\build-nuget-pack.cmd $env:BUILD_TARGET $env:NUSPEC_FILE
4259
43-
test: off #tests handled within FAKE
60+
test: auto
4461

4562
artifacts:
46-
- path: '*.nupkg'
47-
name: NugetPackage
63+
- path: 'Release/**/*.nupkg'
64+
name: NugetPackages
4865

4966
on_failure:
5067
- cmd: |
@@ -55,8 +72,8 @@ deploy:
5572
- provider: NuGet
5673
api_key:
5774
secure: +Zxb8M5W+UJV1yd9n8seu3PvH/hGNPEmgriGBnsSmtxjKPQAJ4+iL7tKAmfPHAuG
58-
artifact: 'NuGetPackage'
75+
artifact: 'NuGetPackages'
5976
on:
60-
branch: master
77+
branch: /master|v\d+\.\d+\.\d+[.*]/
6178
APPVEYOR_REPO_TAG: true
6279

build-nuget-pack.cmd

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@ECHO OFF
2+
setlocal
3+
4+
if "%1" == "" goto :USAGE
5+
if "%2" == "" goto :USAGE
6+
7+
pushd Release\%1
8+
9+
copy ..\..\README.md
10+
copy ..\..\%2.nuspec .
11+
nuget pack "%2.nuspec" -properties Version=%APPVEYOR_BUILD_VERSION%
12+
if errorlevel 1 popd&exit 1 /b
13+
goto :END
14+
15+
:USAGE
16+
echo build-nuget-pack <build_target> <nuspec_file_name>
17+
18+
:END
19+
popd

build.cmd

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
@echo off
2+
setlocal
23

34
cls
45

6+
if "%1" == "" goto :USAGE
7+
if "%1" == "base" set BUILD_TARGET=base
8+
if "%1" == "fsharp" set BUILD_TARGET=fsharp
9+
510
echo.
611
echo SKIP_RESTORE=%SKIP_RESTORE% ^<^< Set to true if have already restored packages
712
if "%SKIP_RESTORE%" == "" choice /T 5 /D Y /M "Continue?"
@@ -19,8 +24,8 @@ if errorlevel 1 (
1924

2025
:BUILD_NET
2126
echo.
22-
echo Fake build.fsx
23-
.\packages\FAKE\tools\Fake %*
27+
28+
msbuild CommandLine.sln /p:Configuration=Release /p:OutputPath=%~dp0\release\%BUILD_TARGET%\net4x
2429

2530
if "%SKIP_RESTORE%" == "true" goto :BUILD_NETSTD
2631
echo.
@@ -29,5 +34,16 @@ dotnet restore
2934

3035
:BUILD_NETSTD
3136
echo.
32-
echo dotnet build
33-
dotnet build --configuration Release --output build\netstandard1.5 --framework netstandard1.5 src\commandline
37+
echo dotnet build --output %~dp0\release\%BUILD_TARGET%\netstandard1.5
38+
dotnet build --configuration Release --output %~dp0release\%BUILD_TARGET%\netstandard1.5 --framework netstandard1.5 src\commandline
39+
40+
goto :END
41+
42+
:USAGE
43+
echo.
44+
echo Invalid arguments specified.
45+
echo.
46+
echo Usage: build <build_target>
47+
echo where <build_target> is base or fsharp
48+
49+
:END

0 commit comments

Comments
 (0)