Skip to content

Commit 5e7b870

Browse files
Merge pull request #37 from elsupergomez/use-tag-for-generate-nuget-version
Use tag for generate nuget version
2 parents 6f021fe + 1e61f56 commit 5e7b870

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

appveyor.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,33 @@ os: Visual Studio 2019
22

33
version: 2.2.1-alpha-{build}
44

5+
init:
6+
- ps: >-
7+
if ($env:APPVEYOR_REPO_TAG -eq "true")
8+
9+
{
10+
Update-AppveyorBuild -Version $($env:APPVEYOR_REPO_TAG_NAME.TrimStart('v'))
11+
}
12+
13+
dotnet_csproj:
14+
patch: true
15+
file: '**\*.csproj'
16+
version: "{version}"
17+
package_version: "{version}"
18+
assembly_version: "{version}"
19+
file_version: "{version}"
20+
informational_version: "{version}"
21+
522
nuget:
23+
account_feed: true
624
project_feed: true
725

826
before_build:
9-
- cmd: set DOTNET_ASSEMBLY_FILE_VERSION=%APPVEYOR_BUILD_NUMBER%
10-
- cmd: set DOTNET_BUILD_VERSION=%APPVEYOR_BUILD_NUMBER%
1127
- ps: dotnet restore
1228

1329
artifacts:
1430
- path: '**\*.nupkg'
1531

16-
build_script:
17-
- cmd: dotnet build src/MakingSense.AspNetCore.Abstractions --version-suffix %APPVEYOR_BUILD_NUMBER%
18-
- cmd: dotnet build src/MakingSense.AspNetCore.HypermediaApi --version-suffix %APPVEYOR_BUILD_NUMBER%
19-
20-
after_build:
21-
- cmd: dotnet pack src/MakingSense.AspNetCore.Abstractions --version-suffix %APPVEYOR_BUILD_NUMBER%
22-
- cmd: dotnet pack src/MakingSense.AspNetCore.HypermediaApi --version-suffix %APPVEYOR_BUILD_NUMBER%
23-
2432
notifications:
2533
- provider: Slack
2634
auth_token:

src/MakingSense.AspNetCore.Abstractions/MakingSense.AspNetCore.Abstractions.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<PackageLicenseUrl>http://www.gnu.org/licenses/lgpl.html</PackageLicenseUrl>
1212
<RepositoryType>git</RepositoryType>
1313
<RepositoryUrl>git://github.com/MakingSense/aspnet-hypermedia-api</RepositoryUrl>
14-
<VersionPrefix>2.2.0-alpha</VersionPrefix>
14+
<Version>2.2.0-alpha</Version>
15+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1516
</PropertyGroup>
1617

1718
<ItemGroup>

src/MakingSense.AspNetCore.HypermediaApi/MakingSense.AspNetCore.HypermediaApi.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<PackageLicenseUrl>http://www.gnu.org/licenses/lgpl.html</PackageLicenseUrl>
1212
<RepositoryType>git</RepositoryType>
1313
<RepositoryUrl>git://github.com/MakingSense/aspnet-hypermedia-api</RepositoryUrl>
14-
<VersionPrefix>2.2.1-alpha</VersionPrefix>
14+
<Version>2.2.1-alpha</Version>
15+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1516
</PropertyGroup>
1617

1718
<ItemGroup>

0 commit comments

Comments
 (0)