Skip to content

Commit 55ca097

Browse files
author
Eirik Tsarpalis
committed
fix multi-target packaging issues
1 parent 3b5cabc commit 55ca097

11 files changed

Lines changed: 1643 additions & 1580 deletions

File tree

.gitignore

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
# Xamarin Studio / monodevelop user-specific
1010
*.userprefs
11+
*.dll.mdb
12+
*.exe.mdb
1113

1214
# Build results
1315

@@ -18,9 +20,6 @@ build/
1820
[Bb]in/
1921
[Oo]bj/
2022

21-
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
22-
!packages/*/build/
23-
2423
# MSTest test Results
2524
[Tt]est[Rr]esult*/
2625
[Bb]uild[Ll]og.*
@@ -62,6 +61,9 @@ ipch/
6261
*.vsp
6362
*.vspx
6463

64+
# Other Visual Studio data
65+
.vs/
66+
6567
# Guidance Automation Toolkit
6668
*.gpState
6769

@@ -108,6 +110,9 @@ csx
108110
# Windows Store app package directory
109111
AppPackages/
110112

113+
# VSCode
114+
.vscode/
115+
111116
# Others
112117
sql/
113118
*.Cache
@@ -180,6 +185,14 @@ release.sh
180185
localpackages/
181186
paket-files
182187
*.orig
188+
.paket/paket.exe
183189
docs/content/license.md
184190
docs/content/release-notes.md
185191
.fake
192+
docs/tools/FSharp.Formatting.svclog
193+
194+
# xunit
195+
xunit*.html
196+
197+
# exclude artifacts folder
198+
artifacts/

.paket/paket.exe

-8.02 MB
Binary file not shown.

FSharp.Control.AsyncSeq.sln

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{63297B
1010
EndProject
1111
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}"
1212
ProjectSection(SolutionItems) = preProject
13+
.gitignore = .gitignore
14+
build.cmd = build.cmd
1315
build.fsx = build.fsx
16+
build.sh = build.sh
1417
LICENSE.txt = LICENSE.txt
1518
README.md = README.md
1619
RELEASE_NOTES.md = RELEASE_NOTES.md
@@ -38,11 +41,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175
3841
EndProject
3942
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{86625A13-D7E2-4EAD-B13A-4F37BD89DE2A}"
4043
EndProject
41-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Control.AsyncSeq", "src\FSharp.Control.AsyncSeq\FSharp.Control.AsyncSeq.fsproj", "{DBDF64C3-BE92-4272-8737-5001C469D9AA}"
44+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Control.AsyncSeq", "src\FSharp.Control.AsyncSeq\FSharp.Control.AsyncSeq.fsproj", "{DBDF64C3-BE92-4272-8737-5001C469D9AA}"
4245
EndProject
4346
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{561B2DD4-BBFB-4E0D-BF73-C10A3E42507C}"
4447
EndProject
45-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Control.AsyncSeq.Tests", "tests\FSharp.Control.AsyncSeq.Tests\FSharp.Control.AsyncSeq.Tests.fsproj", "{F2404B35-0DAD-483D-9406-7C763CDDC029}"
48+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Control.AsyncSeq.Tests", "tests\FSharp.Control.AsyncSeq.Tests\FSharp.Control.AsyncSeq.Tests.fsproj", "{F2404B35-0DAD-483D-9406-7C763CDDC029}"
4649
EndProject
4750
Global
4851
GlobalSection(SolutionConfigurationPlatforms) = preSolution

build.cmd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
@echo off
22
cls
33

4+
.paket\paket.bootstrapper.exe prerelease
5+
if errorlevel 1 (
6+
exit /b %errorlevel%
7+
)
8+
49
.paket\paket.exe restore
510
if errorlevel 1 (
611
exit /b %errorlevel%
@@ -10,4 +15,4 @@ IF NOT EXIST build.fsx (
1015
.paket\paket.exe update
1116
packages\build\FAKE\tools\FAKE.exe init.fsx
1217
)
13-
packages\build\FAKE\tools\FAKE.exe build.fsx %*
18+
packages\build\FAKE\tools\FAKE.exe build.fsx %*

build.fsx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,11 @@ Target "RunTests" (fun _ ->
7777
// Build a NuGet package
7878

7979
Target "NuGet" (fun _ ->
80-
81-
//Paket.Pack (fun p ->
82-
// { p with
83-
// OutputPath = buildDir
84-
// Version = release.NugetVersion
85-
// ReleaseNotes = (toLines release.Notes) })
86-
87-
DotNetCli.Pack (fun p ->
80+
Paket.Pack (fun p ->
8881
{ p with
89-
Project = project
9082
OutputPath = buildDir
91-
AdditionalArgs =
92-
[ "--no-build"
93-
sprintf "/p:Version=%s" release.NugetVersion
94-
//"/p:ReleaseNotes=" + (toLines release.Notes)
95-
]
96-
})
83+
Version = release.NugetVersion
84+
ReleaseNotes = (toLines release.Notes) })
9785
)
9886

9987
Target "PublishNuget" (fun _ ->

build.sh

Lines changed: 72 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,77 @@
1-
#!/bin/bash
2-
export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/
1+
#!/usr/bin/env bash
32

4-
if test "$OS" = "Windows_NT"
3+
set -eu
4+
5+
cd `dirname $0`
6+
7+
PAKET_BOOTSTRAPPER_EXE=.paket/paket.bootstrapper.exe
8+
PAKET_EXE=.paket/paket.exe
9+
FAKE_EXE=packages/build/FAKE/tools/FAKE.exe
10+
11+
FSIARGS=""
12+
FSIARGS2=""
13+
PAKET_BOOTSTRAPPER_ARGS="prerelease"
14+
OS=${OS:-"unknown"}
15+
if [ "$OS" != "Windows_NT" ]
516
then
6-
# use .Net
7-
.paket/paket.exe restore
8-
exit_code=$?
9-
if [ $exit_code -ne 0 ]; then
10-
exit $exit_code
11-
fi
12-
13-
[ ! -e build.fsx ] && .paket/paket.exe update
14-
[ ! -e build.fsx ] && packages/build/FAKE/tools/FAKE.exe init.fsx
15-
packages/build/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
16-
else
17-
# use mono
18-
mono .paket/paket.exe restore
19-
exit_code=$?
20-
if [ $exit_code -ne 0 ]; then
21-
exit $exit_code
17+
# Can't use FSIARGS="--fsiargs -d:MONO" in zsh, so split it up
18+
# (Can't use arrays since dash can't handle them)
19+
FSIARGS="--fsiargs"
20+
FSIARGS2="-d:MONO"
21+
fi
22+
23+
run() {
24+
if [ "$OS" != "Windows_NT" ]
25+
then
26+
mono "$@"
27+
else
28+
"$@"
2229
fi
30+
}
2331

24-
[ ! -e build.fsx ] && mono .paket/paket.exe update
25-
[ ! -e build.fsx ] && mono packages/build/FAKE/tools/FAKE.exe init.fsx
26-
mono packages/build/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
32+
yesno() {
33+
# NOTE: Defaults to NO
34+
read -p "$1 [y/N] " ynresult
35+
case "$ynresult" in
36+
[yY]*) true ;;
37+
*) false ;;
38+
esac
39+
}
40+
41+
set +e
42+
run $PAKET_BOOTSTRAPPER_EXE $PAKET_BOOTSTRAPPER_ARGS
43+
bootstrapper_exitcode=$?
44+
set -e
45+
46+
if [ "$OS" != "Windows_NT" ] &&
47+
[ $bootstrapper_exitcode -ne 0 ] &&
48+
[ $(certmgr -list -c Trust | grep X.509 | wc -l) -le 1 ] &&
49+
[ $(certmgr -list -c -m Trust | grep X.509 | wc -l) -le 1 ]
50+
then
51+
echo "Your Mono installation has no trusted SSL root certificates set up."
52+
echo "This may result in the Paket bootstrapper failing to download Paket"
53+
echo "because Github's SSL certificate can't be verified. One way to fix"
54+
echo "this issue would be to download the list of SSL root certificates"
55+
echo "from the Mozilla project by running the following command:"
56+
echo ""
57+
echo " mozroots --import --sync"
58+
echo ""
59+
echo "This will import over 100 SSL root certificates into your Mono"
60+
echo "certificate repository."
61+
echo ""
62+
if yesno "Run 'mozroots --import --sync' now?"
63+
then
64+
mozroots --import --sync
65+
else
66+
echo "Attempting to continue without running mozroots. This might fail."
67+
fi
68+
# Re-run bootstrapper whether or not the user ran mozroots, because maybe
69+
# they fixed the problem in a separate terminal window.
70+
run $PAKET_BOOTSTRAPPER_EXE $PAKET_BOOTSTRAPPER_ARGS
2771
fi
72+
73+
run $PAKET_EXE restore
74+
75+
[ ! -e build.fsx ] && run $PAKET_EXE update
76+
[ ! -e build.fsx ] && run $FAKE_EXE init.fsx
77+
run $FAKE_EXE "$@" $FSIARGS $FSIARGS2 build.fsx

paket.dependencies

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ source https://api.nuget.org/v3/index.json
22
redirects: on
33
storage: none
44

5-
nuget FSharp.Core
5+
nuget FSharp.Core >= 4.3.2 lowest_matching: true
6+
7+
group Legacy
8+
source https://api.nuget.org/v3/index.json
9+
framework: net452
10+
storage: none
11+
12+
nuget FSharp.Core >= 3.1.2 lowest_matching: true
613

714
group Build
815
source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)