aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-31 14:20:40 -0400
committerGitHub <noreply@github.com>2021-05-31 14:20:40 -0400
commite637408b4af41a5c2b74b160fb37438d4e56cccc (patch)
tree6e9ff322422ac0e5b0ae061d36435f5276b050ee
parent983cdd233913cbd2155508dc0f4f452f7cda3626 (diff)
Auto update manifest version (#1724)
* Update manifest to auto-fill the version based on most recent git tag * Install git in the CI pipeline
-rw-r--r--.github/workflows/ci.yml7
-rw-r--r--dev/data/manifest-variants.json15
-rw-r--r--ext/manifest.json2
3 files changed, 21 insertions, 3 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d928ffa1..fdb1ba67 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,6 +13,13 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: '12.x'
+ - name: Set up git
+ run: |
+ sudo apt-get install -y git
+ git --version
+ git fetch origin $(git branch --show-current) --unshallow --tags > /dev/null 2> /dev/null
+ git status
+ git describe
- name: Install dependencies
run: npm ci
- name: Lint
diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json
index 2703d863..2a4cc867 100644
--- a/dev/data/manifest-variants.json
+++ b/dev/data/manifest-variants.json
@@ -2,7 +2,7 @@
"manifest": {
"manifest_version": 2,
"name": "Yomichan",
- "version": "21.4.30.1",
+ "version": "0.0.0.0",
"description": "Japanese dictionary with Anki integration",
"author": "Alex Yatskov",
"icons": {
@@ -120,7 +120,18 @@
"variants": [
{
"name": "base",
- "buildable": false
+ "buildable": false,
+ "modifications": [
+ {
+ "action": "set",
+ "path": ["version"],
+ "command": {
+ "command": "git",
+ "args": ["describe", "--abbrev=0"],
+ "trim": true
+ }
+ }
+ ]
},
{
"name": "chrome",
diff --git a/ext/manifest.json b/ext/manifest.json
index e59d0c22..a002cb47 100644
--- a/ext/manifest.json
+++ b/ext/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Yomichan",
- "version": "21.4.30.1",
+ "version": "21.4.30.0",
"description": "Japanese dictionary with Anki integration",
"author": "Alex Yatskov",
"icons": {