diff --git a/.r-tool.json b/.r-tool.json index 8140411..1a3eb25 100644 --- a/.r-tool.json +++ b/.r-tool.json @@ -5,8 +5,7 @@ { "command": "b" }, { "command": "b", "args":"poke:version -s" }, { "command": "yarn", "args": "changelog" }, - { "command": "git", "args": "add ."}, - { "command": "git", "args": "commit -m \"chore: new version %NEW_VERSION%\""}, + { "command": "b", "args": "commit:version -s"}, { "command": "git", "args": "push"} ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 86571f4..222a684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## (2022-12-14) +* feat: try to use $SEMVER ([aedf3fd](https://github.com/xenial-io/Xenial.RTool/commit/aedf3fd)) + + + +## (2022-12-14) + diff --git a/build/Program.cs b/build/Program.cs index 04595e7..5742092 100644 --- a/build/Program.cs +++ b/build/Program.cs @@ -17,11 +17,18 @@ Target("poke:version", DependsOn("test"), async () => { var json = await File.ReadAllTextAsync("package.json"); - json = PokeJson.AddOrUpdateJsonValue(json, "version", Environment.GetEnvironmentVariable("NEW_VERSION")); + json = PokeJson.AddOrUpdateJsonValue(json, "version", Environment.GetEnvironmentVariable("SEMVER")); await File.WriteAllTextAsync("package.json", json); } ); +Target("commit:version", async () => +{ + await RunAsync("git", $"add ."); + await RunAsync("git", $"commit -m \"release: new version {Environment.GetEnvironmentVariable("SEMVER")}\""); +} +); + Target("deploy", async () => { var files = Directory.EnumerateFiles("artifacts/nuget", "*.nupkg"); diff --git a/package.json b/package.json index bcb5770..a815672 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xenial.rtool", - "version": null, + "version": "ABC", "main": "index.js", "repository": "https://github.com/xenial-io/Xenial.RTool.git", "author": "Manuel Grundner ",