Skip to content

Commit f53fe72

Browse files
committed
fix: add zip task to bin generator
1 parent 7a9f46e commit f53fe72

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/dotnet/Schema.Generator/Schema.Generator.CLI/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414
var contextToken = new CancellationToken();
1515

16+
// var shortV = "0.2.0";
17+
// app.VersionOption($"{shortV}", shortV); // "0.2.0-7a9f46e78b1104a46a36c46ab80f15462aea2d83"
18+
// app.VersionOptionFromAssemblyAttributes();
19+
1620
app.OnExecuteAsync((contextToken) =>
1721
{
1822
var gen = new Generate(path.Value(), nsFilter?.Values.ToArray(), derefSchema.Values.Count > 0, output.Value());

src/dotnet/Schema.Generator/taskfile.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ tasks:
2323
cmd: |
2424
cd src/dotnet
2525
dotnet publish Schema.Generator/Schema.Generator.CLI/Schema.Generator.CLI.csproj -r {{.NETCORE_TARGET_ARCH}} -o ../../dist/dotnet/{{.NETCORE_TARGET_ARCH}};
26+
cd ../../dist/dotnet
27+
zip -r {{.NETCORE_TARGET_ARCH}}.zip ./{{.NETCORE_TARGET_ARCH}}
2628
vars:
2729
NETCORE_TARGET_ARCHS: win-x64 osx-x64 osx-arm64 linux-x64 linux-musl-x64
2830
env:
29-
VERSION: "{{.GIT_TAG}}"
31+
VERSION: "{{ .GIT_TAG}}"
32+
requires:
33+
vars:
34+
- GIT_TAG
35+
3036

3137
test:
3238
desc: Runs the tests for SchemaGenerator
@@ -36,7 +42,7 @@ tasks:
3642
dotnet build Sample.Generated.DLL.Source/Sample.Generated.DLL.Source.csproj
3743
dotnet test -l trx --collect "XPlat Code Coverage" --results-directory .coverage
3844
env:
39-
VERSION: 0.0.1
45+
VERSION: 0.2.0
4046

4147
show-coverage:
4248
desc: Shows coverage in a visual tool

0 commit comments

Comments
 (0)