Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
.vscode | ||
|
||
node_modules | ||
deploy | ||
dist | ||
|
||
tests/key.js | ||
npm-debug.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# git tag prefix | ||
tag-version-prefix="" | ||
|
||
# disable package-lock.json | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# only tagged build/deploy | ||
if: tag IS present | ||
|
||
sudo: required | ||
language: node_js | ||
node_js: | ||
- lts/* | ||
|
||
env: | ||
global: | ||
- SOURCE=dist/bundle.zip | ||
- EXTENSION_ID=pinjkilghdfhnkibhcangnpmcpdpmehk | ||
- CLIENT_ID=$WS_CLIENT_ID | ||
- CLIENT_SECRET=$WS_CLIENT_SECRET | ||
- REFRESH_TOKEN=$WS_REFRESH_TOKEN | ||
|
||
before_script: | ||
- npm i | ||
- npm run bundle | ||
|
||
script: | ||
- npx --no-install webstore upload --source $SOURCE --extension-id $EXTENSION_ID --client-id $CLIENT_ID --client-secret $CLIENT_SECRET --refresh-token $REFRESH_TOKEN --auto-publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
/** | ||
* @file gulpfile | ||
*/ | ||
|
||
const fs = require("fs"); | ||
const gulp = require("gulp"); | ||
const gulp_zip = require("gulp-zip"); | ||
const gulp_json_modify = require("gulp-json-modify"); | ||
const merge_stream = require("merge-stream"); | ||
|
||
gulp.task("bundle", function () { | ||
const pkg = JSON.parse(fs.readFileSync("./package.json", {encoding: "utf8"})); | ||
const others = gulp.src(["src/**", "!src/manifest.json"]); | ||
const manifest = gulp.src("src/manifest.json") | ||
.pipe(gulp_json_modify({ | ||
key: "version", | ||
value: pkg.version, | ||
})); | ||
|
||
gulp.task("deploy", function () { | ||
return gulp.src("source/**") | ||
return merge_stream(manifest, others) | ||
.pipe(gulp_zip("bundle.zip")) | ||
.pipe(gulp.dest("deploy")) | ||
.pipe(gulp.dest("dist")); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters