Skip to content

Commit

Permalink
Fix version number for Beta
Browse files Browse the repository at this point in the history
One to four dot-separated integers identifying the version of this extension. A couple of rules apply to the integers:

    The integers must be between 0 and 65535, inclusive.
    Non-zero integers can't start with 0. For example, 032 is invalid because it begins with a zero.
    They must not be all zero. For example, 0 and 0.0.0.0 are invalid while 0.1.0.0 is valid.

https://developer.chrome.com/docs/extensions/reference/manifest/version
  • Loading branch information
modos189 committed Jun 27, 2024
1 parent d1ae01d commit 844785d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,26 @@ jobs:
- build_script: build_mv3_chrome
- build_script: build_mv3_safari
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Linter
run: npm run lint

- name: Set BETA environment variable
- name: Set BETA environment variables
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo "BETA=true" >> $GITHUB_ENV
run: |
echo "BETA=true" >> $GITHUB_ENV
echo "GIT_REV_COUNT=`git rev-list --all --count`" >> $GITHUB_ENV
- name: Build
run: npm run ${{ matrix.build_script }}
Expand Down
10 changes: 2 additions & 8 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ const manifest_transformer = (manifest) => {
manifest.icons["48"] = "assets/icons/48/icon-beta.png";
manifest.icons["128"] = "assets/icons/128/icon-beta.png";

let currentDate = new Date();
let year = String(currentDate.getFullYear()).slice(-2);
let month = String(currentDate.getMonth() + 1).padStart(2, "0");
let day = String(currentDate.getDate()).padStart(2, "0");
let hours = String(currentDate.getHours()).padStart(2, "0");

let formattedDate = `${year}${month}${day}${hours}`;
manifest.version = `${manifest.version}.${formattedDate}`;
const git_rev_count = parseInt(process.env.GIT_REV_COUNT) % 65535;
manifest.version = `${manifest.version}.${git_rev_count}`;
}

if (manifest_version === "2") {
Expand Down

0 comments on commit 844785d

Please sign in to comment.