Skip to content

Commit 2e526e1

Browse files
Merge pull request #37 from AshleighAdams/packaging-bug
Allow overriding Verlite.CLI's target framework.
2 parents afce568 + 20e74d7 commit 2e526e1

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

src/Verlite.CLI/Verlite.CLI.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFrameworks>netcoreapp2.1;net5.0;</TargetFrameworks>
45
<OutputType>Exe</OutputType>
56
<PackAsTool>true</PackAsTool>
67
<ToolCommandName>verlite</ToolCommandName>

src/Verlite.Core/Verlite.Core.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netstandard2.0</TargetFramework>
3+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
44
<Description>Core primitives and logic for automatic versioning via Git tags.</Description>
55
<RootNamespace>Verlite</RootNamespace>
66
</PropertyGroup>

tests/IntegrationTests/run.sh

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -euo pipefail
44
cd "$(dirname $0)"
55

66
export VERBOSE=""
7+
export REPO_PATH="$(git rev-parse --show-toplevel)"
78

89
# setup the packages as version 0.0.0
910
export NUGET_PACKAGES="$(mktemp -d)"
@@ -59,5 +60,6 @@ test branch-follows-first-parent
5960
test msbuild
6061
test multiple-tags-on-same-commit
6162
test auto-fetch
63+
test publish-different-framework
6264

6365
echo "All complete."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
git clone "$REPO_PATH" verlite > /dev/null 2> /dev/null
5+
6+
dotnet publish \
7+
verlite/src/Verlite.CLI/Verlite.CLI.csproj \
8+
-o artifacts \
9+
-p:TargetFramework=net5.0 \
10+
-p:PackAsTool=false \
11+
> /dev/null 2> /dev/null
12+
13+
dotnet publish \
14+
verlite/src/Verlite.CLI/Verlite.CLI.csproj \
15+
-o artifacts2 \
16+
-f=net5.0 \
17+
-p:PackAsTool=false \
18+
> /dev/null 2> /dev/null
19+
20+
should-exist() {
21+
if [[ ! -f "$1" ]]; then
22+
echo "Missing artifact: $1"
23+
exit 1
24+
fi
25+
}
26+
27+
should-exist artifacts/Verlite.CLI.dll
28+
should-exist artifacts2/Verlite.CLI.dll

0 commit comments

Comments
 (0)