Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version number for Beta #149

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iitc-button",
"version": "3.0.3",
"version": "3.0.4",
"repository": "https://github.com/IITC-CE/IITC-Button.git",
"license": "GPLv3",
"private": true,
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
Loading