Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Timon Stampfli
soicode
Commits
ab3432ee
Commit
ab3432ee
authored
Oct 19, 2019
by
Timon Stampfli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci devbuilds: use commithash for tagging
parent
63815e1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
10 deletions
+33
-10
.gitlab-ci.yml
.gitlab-ci.yml
+27
-7
package-lock.json
package-lock.json
+1
-1
package.json
package.json
+1
-2
setversion.js
setversion.js
+4
-0
No files found.
.gitlab-ci.yml
View file @
ab3432ee
...
...
@@ -2,19 +2,41 @@ stages:
-
build-deps
-
build
-
publish
build
:
build-dev
:
except
:
-
tags
stage
:
build
image
:
node:12
script
:
-
node ./setversion 0.0.0-$CI_COMMIT_SHORT_SHA
-
npm ci
-
npm run build-package
-
mv soicode-*.vsix soicode-dev-$CI_COMMIT_SHORT_SHA.vsix
dependencies
:
-
build-helper
artifacts
:
untracked
:
false
paths
:
-
soicode-dev-$CI_COMMIT_SHORT_SHA.vsix
expire_in
:
30 day
build-release
:
only
:
-
tags
stage
:
build
image
:
node:12
script
:
-
node ./setversion $CI_COMMIT_TAG
-
npm ci
-
npm run build-package
-
mv soicode-*.vsix soicode-
latest
.vsix
-
mv soicode-*.vsix soicode-
$CI_COMMIT_TAG
.vsix
dependencies
:
-
build-helper
artifacts
:
untracked
:
false
paths
:
-
soicode-
latest
.vsix
-
soicode-
$CI_COMMIT_TAG
.vsix
expire_in
:
30 days
publish
:
...
...
@@ -23,10 +45,9 @@ publish:
stage
:
publish
image
:
node:10
script
:
-
npm run validateGitTag
-
npx vsce publish -p $PUBLISHING_TOKEN --packagePath soicode-latest.vsix
-
npx vsce publish -p $PUBLISHING_TOKEN --packagePath soicode-$CI_COMMIT_TAG.vsix
dependencies
:
-
build
-
build
-release
build-helper
:
stage
:
build-deps
...
...
@@ -37,7 +58,6 @@ build-helper:
-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./dist/helper-linux-amd64 ./helper
-
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ./dist/helper-windows-amd64.exe ./helper
-
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ./dist/helper-darwin-amd64 ./helper
artifacts
:
untracked
:
false
paths
:
...
...
package-lock.json
View file @
ab3432ee
{
"name"
:
"soicode"
,
"version"
:
"0.
8.17
"
,
"version"
:
"0.
0.0
"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"dependencies"
:
{
...
...
package.json
View file @
ab3432ee
...
...
@@ -2,7 +2,7 @@
"name"
:
"soicode"
,
"displayName"
:
"soicode"
,
"description"
:
"A extension which provides integration to solve soi (soi.ch) tasks in vscode"
,
"version"
:
"0.
8.17
"
,
"version"
:
"0.
0.0
"
,
"publisher"
:
"swissolyinfo"
,
"engines"
:
{
"vscode"
:
"^1.33.0"
...
...
@@ -264,7 +264,6 @@
"pretest"
:
"npm run compile"
,
"build-package"
:
"vsce package"
,
"test"
:
"node ./out/test/runTest.js"
,
"validateGitTag"
:
"if [ $npm_package_version != $CI_COMMIT_TAG ]; then exit 1; fi"
,
"vscode:prepublish"
:
"webpack --mode production"
,
"webpack"
:
"webpack --mode production"
},
...
...
setversion.js
0 → 100644
View file @
ab3432ee
const
fs
=
require
(
"
fs
"
);
const
packageSpec
=
JSON
.
parse
(
fs
.
readFileSync
(
"
package.json
"
).
toString
());
packageSpec
.
version
=
process
.
argv
[
2
];
fs
.
writeFileSync
(
"
package.json
"
,
JSON
.
stringify
(
packageSpec
,
null
,
2
)
+
"
\n
"
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment