Skip to content

Commit

Permalink
extension/tools/release: skip version check for package creation
Browse files Browse the repository at this point in the history
Tools gh, git, jq is not required for package creation:
- gh & git is being used only in publish.
- jq is no longer needed because version check is now skipped.

For #3500

Change-Id: I530f600bb983ac1e9e884bc6910bcd8f1b0717e0
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/612815
Commit-Queue: Hongxiang Jiang <hxjiang@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Hongxiang Jiang <hxjiang@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
  • Loading branch information
h9jiang authored and gopherbot committed Sep 12, 2024
1 parent 1a3eb27 commit 97292e3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions extension/tools/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,11 @@ func runPackage(cmd *command, args []string) {

checkWD()

requireTools("jq", "npx", "gh", "git")
requireTools("npx")

tagName := requireEnv("TAG_NAME")

version, isPrerelease := releaseVersionInfo(tagName)
checkPackageJSON(tagName, isPrerelease)
outDir := prepareOutputDir(cmd.lookupFlag("out").String())
vsix := filepath.Join(outDir, fmt.Sprintf("go-%s.vsix", version))
buildPackage(version, tagName, isPrerelease, vsix)
Expand Down Expand Up @@ -423,7 +422,6 @@ func buildPackage(version, tagName string, isPrerelease bool, output string) {
}
if isPrerelease {
args = append(args, "--pre-release")

}
args = append(args, version)

Expand Down
1 change: 0 additions & 1 deletion extension/tools/release/testdata/package-v0.43.0.golden
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
jq -r .version package.json
cp ../README.md README.md
npx vsce package -o /tmp/artifacts/go-0.43.0.vsix --baseContentUrl https://github.com/golang/vscode-go/raw/v0.43.0 --baseImagesUrl https://github.com/golang/vscode-go/raw/v0.43.0 --no-update-package-json --no-git-tag-version --pre-release 0.43.0
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
jq -r .version package.json
cp ../README.md README.md
npx vsce package -o /tmp/artifacts/go-0.44.0-rc.1.vsix --baseContentUrl https://github.com/golang/vscode-go/raw/v0.44.0-rc.1 --baseImagesUrl https://github.com/golang/vscode-go/raw/v0.44.0-rc.1 --no-update-package-json --no-git-tag-version --pre-release 0.44.0-rc.1
1 change: 0 additions & 1 deletion extension/tools/release/testdata/package-v0.44.0.golden
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
jq -r .version package.json
cp ../README.md README.md
npx vsce package -o /tmp/artifacts/go-0.44.0.vsix --baseContentUrl https://github.com/golang/vscode-go/raw/v0.44.0 --baseImagesUrl https://github.com/golang/vscode-go/raw/v0.44.0 --no-update-package-json --no-git-tag-version 0.44.0

0 comments on commit 97292e3

Please sign in to comment.