From e7a6ecbf85a89325f5d550b80a6d9f9483eda066 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20P=C3=B6lz?=
<38893694+Flash0ver@users.noreply.github.com>
Date: Thu, 9 Nov 2023 19:08:29 +0100
Subject: [PATCH] build: add package properties (#63)
split Version into VersionPrefix and VersionSuffix
fix test ProjectReference
---
.gitattributes | 31 ++++
.gitignore | 132 +++++++++++++++++-
.nuke/parameters.json | 3 +-
docs/CHANGELOG-Prerelease.md | 8 ++
docs/CHANGELOG.md | 8 ++
docs/Index.md | 8 ++
global.json | 6 +
nuget.config | 7 +
resources/FlashOWare.Tool-Prerelease.png | Bin 0 -> 2736 bytes
resources/FlashOWare.Tool-Preview.png | Bin 4754 -> 0 bytes
resources/README.md | 2 +
src/build/FlashOWare.Tool.Build/Build.cs | 29 ++--
.../FlashOWare.Tool.Cli.Tests.csproj | 2 +-
.../FlashOWare.Tool/FlashOWare.Tool.csproj | 41 ++++--
.../Properties/AssemblyInfo.cs | 3 +
15 files changed, 252 insertions(+), 28 deletions(-)
create mode 100644 .gitattributes
create mode 100644 docs/CHANGELOG-Prerelease.md
create mode 100644 docs/CHANGELOG.md
create mode 100644 docs/Index.md
create mode 100644 global.json
create mode 100644 nuget.config
create mode 100644 resources/FlashOWare.Tool-Prerelease.png
delete mode 100644 resources/FlashOWare.Tool-Preview.png
create mode 100644 resources/README.md
create mode 100644 src/tools/FlashOWare.Tool/Properties/AssemblyInfo.cs
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..68434d4
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,31 @@
+* text=auto
+
+*.config text
+*.cs text diff=csharp
+*.cshtml text
+*.csproj text
+*.css text diff=css
+*.editorconfig text
+*.globalconfig text
+*.htm text diff=html
+*.html text diff=html
+*.json text
+*.md text diff=markdown
+*.props text
+*.ps1 text
+*.razor text
+*.resx text
+*.runsettings text
+*.sln text
+*.slnf text
+*.targets text
+*.txt text
+*.vb text
+*.vbproj text
+*.vsixmanifest text
+*.xaml text
+*.xml text
+*.yaml text
+*.yml text
+
+*.png binary
diff --git a/.gitignore b/.gitignore
index 4c4e2fe..5a64a0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
-## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
@@ -23,6 +23,7 @@ mono_crash.*
[Rr]eleases/
x64/
x86/
+[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
@@ -56,11 +57,17 @@ dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
-# .NET Core
+# .NET
project.lock.json
project.fragment.lock.json
artifacts/
+# Tye
+.tye/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
# StyleCop
StyleCopReport.xml
@@ -86,6 +93,7 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
+*.tlog
*.vspscc
*.vssscc
.builds
@@ -137,6 +145,11 @@ _TeamCity*
.axoCover/*
!.axoCover/settings.json
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
# Visual Studio code coverage results
*.coverage
*.coveragexml
@@ -284,6 +297,17 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
+# Visual Studio 6 auto-generated project file (contains which files were open etc.)
+*.vbp
+
+# Visual Studio 6 workspace and project file (working project files containing files to include in project)
+*.dsw
+*.dsp
+
+# Visual Studio 6 technical files
+*.ncb
+*.aps
+
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
@@ -340,6 +364,9 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/
+# Visual Studio History (VSHistory) files
+.vshistory/
+
# BeatPulse healthcheck temp database
healthchecksdb
@@ -349,6 +376,107 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
+
+# VS Code files for those working on multiple tools
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+# Windows Installer files from build outputs
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+##
+## Visual studio for Mac
+##
+
+
+# globs
+Makefile.in
+*.userprefs
+*.usertasks
+config.make
+config.status
+aclocal.m4
+install-sh
+autom4te.cache/
+*.tar.gz
+tarballs/
+test-results/
+
+# Mac bundle stuff
+*.dmg
+*.app
+
+# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
+# Windows thumbnail cache files
+Thumbs.db
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
# NUKE
.nuke/temp/
.nuke/build.schema.json
diff --git a/.nuke/parameters.json b/.nuke/parameters.json
index 0e7c31b..f08e1a6 100644
--- a/.nuke/parameters.json
+++ b/.nuke/parameters.json
@@ -1,6 +1,7 @@
{
"$schema": "./build.schema.json",
"Solution": "src/FlashOWare.Tool.sln",
- "Version": "1.0.0-prerelease0",
+ "VersionPrefix": "1.0.0",
+ "VersionSuffix": "prerelease0",
"NuGetSource": "https://api.nuget.org/v3/index.json"
}
diff --git a/docs/CHANGELOG-Prerelease.md b/docs/CHANGELOG-Prerelease.md
new file mode 100644
index 0000000..ecee33c
--- /dev/null
+++ b/docs/CHANGELOG-Prerelease.md
@@ -0,0 +1,8 @@
+# FlashOWare.Tool
+Prerelease Changelog
+
+[goto Release_Changelog;](./CHANGELOG.md)
+
+## [vNext]
+
+[vnext]: https://github.com/FlashOWare/FlashOWare.Tool
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
new file mode 100644
index 0000000..838d278
--- /dev/null
+++ b/docs/CHANGELOG.md
@@ -0,0 +1,8 @@
+# FlashOWare.Tool
+Release Changelog
+
+[goto Prerelease_Changelog;](./CHANGELOG-Prerelease.md)
+
+## [vNext]
+
+[vnext]: https://github.com/FlashOWare/FlashOWare.Tool
diff --git a/docs/Index.md b/docs/Index.md
new file mode 100644
index 0000000..09bc3d3
--- /dev/null
+++ b/docs/Index.md
@@ -0,0 +1,8 @@
+# FlashOWare.Tool
+
+## Documentation
+TODO
+
+## Changelogs
+- [Release Changelog](./CHANGELOG.md)
+- [Prerelease Changelog](./CHANGELOG-Prerelease.md)
diff --git a/global.json b/global.json
new file mode 100644
index 0000000..b887553
--- /dev/null
+++ b/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "version": "7.0.100",
+ "rollForward": "feature"
+ }
+}
diff --git a/nuget.config b/nuget.config
new file mode 100644
index 0000000..fbcef10
--- /dev/null
+++ b/nuget.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/resources/FlashOWare.Tool-Prerelease.png b/resources/FlashOWare.Tool-Prerelease.png
new file mode 100644
index 0000000000000000000000000000000000000000..a1453dcadd4e6460718aa666c42acaa263c93514
GIT binary patch
literal 2736
zcmb_ec|6oz7yp^;TiKT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R1cRV$5unBBJqFL64vL?D
zl{2<^(_~zOI%)^0D|_92z8J>K2w=V+d<=SYQssc>LRtn!;O0kQ;9yRM7~o1xz1;ov
zNw{g@eev-IE^$DA1V)FkH)CauMeXL^AAgqjPFHkQwAGYViw6^id-F@7R~<0Q``#U*
z!AxL-Enj>ml(r
zko)hMWV&?lH)k&CE{y!rtSt3BydmR$a7m#2&?9C7h=ycmsIMvPwQYPt`~Uw-B*SCl
VR%+A@jQ=oc_0^3$rIlRKe*h4yubTh>
diff --git a/resources/README.md b/resources/README.md
new file mode 100644
index 0000000..4382fee
--- /dev/null
+++ b/resources/README.md
@@ -0,0 +1,2 @@
+# About
+A .NET tool that facilitates development workflows.
diff --git a/src/build/FlashOWare.Tool.Build/Build.cs b/src/build/FlashOWare.Tool.Build/Build.cs
index dc484ee..b87e342 100644
--- a/src/build/FlashOWare.Tool.Build/Build.cs
+++ b/src/build/FlashOWare.Tool.Build/Build.cs
@@ -28,13 +28,7 @@
ImportSecrets = new[] { nameof(NuGetApiKey) })]
class Build : NukeBuild
{
- /// Support plugins are available for:
- /// - JetBrains ReSharper https://nuke.build/resharper
- /// - JetBrains Rider https://nuke.build/rider
- /// - Microsoft VisualStudio https://nuke.build/visualstudio
- /// - Microsoft VSCode https://nuke.build/vscode
-
- public static int Main () => Execute(x => x.Compile);
+ public static int Main() => Execute(x => x.Compile);
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
@@ -55,11 +49,12 @@ class Build : NukeBuild
[Solution] readonly Solution Solution;
- [Parameter] readonly string Version;
+ [Parameter] readonly string VersionPrefix;
+ [Parameter] readonly string VersionSuffix;
[Parameter] readonly string NuGetSource;
- [Parameter] [Secret] readonly string NuGetApiKey;
+ [Parameter][Secret] readonly string NuGetApiKey;
Target Restore => _ => _
.Executes(() =>
@@ -86,16 +81,17 @@ class Build : NukeBuild
.DependsOn(Compile)
.Executes(() =>
{
- DotNetTest(_ => _
- .SetProjectFile(Solution)
- .SetConfiguration(Configuration)
- .SetNoBuild(FinishedTargets.Contains(Compile))
- .SetResultsDirectory(TestResultsDirectory));
+ DotNetTest(_ => _
+ .SetProjectFile(Solution)
+ .SetConfiguration(Configuration)
+ .SetNoBuild(FinishedTargets.Contains(Compile))
+ .SetResultsDirectory(TestResultsDirectory));
});
Target Pack => _ => _
.DependsOn(Compile)
- .Requires(() => Version)
+ .Requires(() => VersionPrefix)
+ .Requires(() => VersionSuffix)
.Executes(() =>
{
DotNetPack(_ => _
@@ -103,7 +99,8 @@ class Build : NukeBuild
.SetConfiguration(Configuration)
.SetNoBuild(FinishedTargets.Contains(Compile))
.EnableNoLogo()
- .SetVersion(Version)
+ .SetVersionPrefix(VersionPrefix)
+ .SetVersionSuffix(VersionSuffix)
.SetOutputDirectory(PackageDirectory)
.SetProcessExitHandler(p => p.ExitCode switch
{
diff --git a/src/tests/FlashOWare.Tool.Cli.Tests/FlashOWare.Tool.Cli.Tests.csproj b/src/tests/FlashOWare.Tool.Cli.Tests/FlashOWare.Tool.Cli.Tests.csproj
index 74a2f2e..ed885de 100644
--- a/src/tests/FlashOWare.Tool.Cli.Tests/FlashOWare.Tool.Cli.Tests.csproj
+++ b/src/tests/FlashOWare.Tool.Cli.Tests/FlashOWare.Tool.Cli.Tests.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/src/tools/FlashOWare.Tool/FlashOWare.Tool.csproj b/src/tools/FlashOWare.Tool/FlashOWare.Tool.csproj
index 44e96ba..e1a5e0c 100644
--- a/src/tools/FlashOWare.Tool/FlashOWare.Tool.csproj
+++ b/src/tools/FlashOWare.Tool/FlashOWare.Tool.csproj
@@ -18,26 +18,51 @@
true
-
- false
+
+ en
+
+
+
FlashOWare.Tool
- FlashOWare,Flash0ver,MerelyEva
+ FlashOWare.Tool
+ FlashOWare;Flash0ver;MerelyEva
FlashOWare
FlashOWare.Tool
A .NET tool that facilitates development workflows.
© FlashOWare
https://github.com/FlashOWare/FlashOWare.Tool
- https://raw.githubusercontent.com/FlashOWare/FlashOWare.Tool/main/resources/FlashOWare.Tool.png
+ Icon.png
+ README.md
https://github.com/FlashOWare/FlashOWare.Tool.git
git
- FlashOWare;Tool;Roslyn;CodeAnalysis
- Initial pre-release.
+ FlashOWare;f[0];F0;Tool;Roslyn;CodeAnalysis;CSharp
MIT
- false
+
+ https://raw.githubusercontent.com/FlashOWare/FlashOWare.Tool/main/resources/FlashOWare.Tool-Prerelease.png
+ https://github.com/FlashOWare/FlashOWare.Tool/blob/main/docs/CHANGELOG-Prerelease.md
+
+
+
+ https://raw.githubusercontent.com/FlashOWare/FlashOWare.Tool/main/resources/FlashOWare.Tool.png
+ https://github.com/FlashOWare/FlashOWare.Tool/blob/main/docs/CHANGELOG.md
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
diff --git a/src/tools/FlashOWare.Tool/Properties/AssemblyInfo.cs b/src/tools/FlashOWare.Tool/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ce6dfec
--- /dev/null
+++ b/src/tools/FlashOWare.Tool/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Reflection;
+
+[assembly: AssemblyTrademark("FlashOWare")]