Skip to content

Commit

Permalink
Added building script.
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed May 28, 2024
1 parent d0edbb4 commit 88c40f7
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RelaxVersioner.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.ja.md = README.ja.md
README.md = README.md
STARTGUIDE.md = STARTGUIDE.md
build-nupkg-bootstrap.sh = build-nupkg-bootstrap.sh
build-nupkg.sh = build-nupkg.sh
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Images", "Images", "{98ADE163-2FFB-47B0-AA7A-1A294DD7276F}"
Expand Down
25 changes: 25 additions & 0 deletions build-nupkg-bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# RelaxVersioner - Git tag/branch based, full-automatic version generator.
# Copyright (c) Kouji Matsui (@kozy_kekyo, @kekyo@mastodon.cloud)
#
# Licensed under Apache-v2: https://opensource.org/licenses/Apache-2.0

# This script is used by the RelaxVersioner to get over when .NET releases a new major version.
# For example .NET 8.0 release, the RelaxVersioner that uses itself will fail to build
# because it must support the `net8.0` TFM, which was not included in earlier versions.
# This script will generate a RelaxVersioner with a temporary version embedded
# and a private package so that it can build itself with the new .NET version.

# `PackageVersion` should be set appropriately.

echo ""
echo "==========================================================="
echo "Build RelaxVersioner (Bootstrap)"
echo ""

# https://github.com/dotnet/msbuild/issues/1709
export MSBUILDDISABLENODEREUSE=1

dotnet build -p:Configuration=Release -p:Platform="Any CPU" -p:BOOTSTRAP=True -p:PackageVersion=3.2.10 -p:RestoreNoCache=True RelaxVersioner.sln
dotnet pack -p:Configuration=Release -p:Platform="Any CPU" -p:BOOTSTRAP=True -p:PackageVersion=3.2.10 -o artifacts RelaxVersioner.sln
17 changes: 17 additions & 0 deletions build-nupkg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# RelaxVersioner - Git tag/branch based, full-automatic version generator.
# Copyright (c) Kouji Matsui (@kozy_kekyo, @kekyo@mastodon.cloud)
#
# Licensed under Apache-v2: https://opensource.org/licenses/Apache-2.0

echo ""
echo "==========================================================="
echo "Build RelaxVersioner"
echo ""

# https://github.com/dotnet/msbuild/issues/1709
export MSBUILDDISABLENODEREUSE=1

dotnet build -p:Configuration=Release -p:Platform="Any CPU" -p:RestoreNoCache=True RelaxVersioner.sln
dotnet pack -p:Configuration=Release -p:Platform="Any CPU" -o artifacts RelaxVersioner.sln

0 comments on commit 88c40f7

Please sign in to comment.