extension/tools/release: skip version check for package creation
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 golang/vscode-go#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>
diff --git a/extension/tools/release/release.go b/extension/tools/release/release.go
index f064026..7f1d4cd 100644
--- a/extension/tools/release/release.go
+++ b/extension/tools/release/release.go
@@ -210,12 +210,11 @@
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)
@@ -423,7 +422,6 @@
}
if isPrerelease {
args = append(args, "--pre-release")
-
}
args = append(args, version)
diff --git a/extension/tools/release/testdata/package-v0.43.0.golden b/extension/tools/release/testdata/package-v0.43.0.golden
index 25add26..686ad2c 100644
--- a/extension/tools/release/testdata/package-v0.43.0.golden
+++ b/extension/tools/release/testdata/package-v0.43.0.golden
@@ -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
diff --git a/extension/tools/release/testdata/package-v0.44.0-rc.1.golden b/extension/tools/release/testdata/package-v0.44.0-rc.1.golden
index cf64dfb..a050e70 100644
--- a/extension/tools/release/testdata/package-v0.44.0-rc.1.golden
+++ b/extension/tools/release/testdata/package-v0.44.0-rc.1.golden
@@ -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
diff --git a/extension/tools/release/testdata/package-v0.44.0.golden b/extension/tools/release/testdata/package-v0.44.0.golden
index 120583d..bbcf4ba 100644
--- a/extension/tools/release/testdata/package-v0.44.0.golden
+++ b/extension/tools/release/testdata/package-v0.44.0.golden
@@ -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