Skip to content

Commit 948cfdc

Browse files
committed
Fix AppVeyor build, allow setting version from CI
1 parent ecbde64 commit 948cfdc

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

.nuke/build.schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"RestoreBackend",
7777
"TestBackend",
7878
"TestExtension",
79-
"vsix"
79+
"Vsix"
8080
]
8181
}
8282
},
@@ -94,7 +94,7 @@
9494
"RestoreBackend",
9595
"TestBackend",
9696
"TestExtension",
97-
"vsix"
97+
"Vsix"
9898
]
9999
}
100100
},
@@ -107,6 +107,10 @@
107107
"Quiet",
108108
"Verbose"
109109
]
110+
},
111+
"Version": {
112+
"type": "string",
113+
"description": "Release version to build"
110114
}
111115
}
112116
}

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ nuget:
1616
before_build:
1717
- cmd:
1818
build_script:
19-
- cmd: build.cmd %appveyor_build_version%
19+
- cmd: build.cmd vsix --version %appveyor_build_version%
2020
artifacts:
2121
- path: 'vscode-extension\*.vsix'
2222
test: off

build/Build.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class Build : NukeBuild
2727
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
2828
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
2929

30+
[Parameter("Release version to build")]
31+
readonly string Version;
32+
3033
[Solution] readonly Solution BackendSolution;
3134
[GitRepository] readonly GitRepository GitRepository;
3235

@@ -97,10 +100,13 @@ class Build : NukeBuild
97100
Npm("test", VSCodeExtensionDir);
98101
});
99102

100-
Target vsix => _ => _
103+
Target Vsix => _ => _
101104
.DependsOn(Backend, CompileExtension)
102105
.Executes(() =>
103106
{
104-
StartProcess("vsce", "package -o ilspy-vscode.vsix", VSCodeExtensionDir);
107+
NpmInstall(s => s
108+
.SetPackages("vsce")
109+
.SetGlobal(true));
110+
StartProcess("vsce", $"package -o ilspy-vscode-{Version ?? "local"}.vsix", VSCodeExtensionDir);
105111
});
106112
}

vscode-extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@
8888
"typescript": "^4.1.3",
8989
"vscode-test": "^1.5.0"
9090
}
91-
}
91+
}

0 commit comments

Comments
 (0)