Skip to content

Commit d16e00b

Browse files
committed
fix(manifest): fix version on manifest
1 parent 53e324d commit d16e00b

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,16 @@ jobs:
1717
uses: actions/setup-node@v3
1818
with:
1919
node-version: ${{ matrix.node-version }}
20+
cache: 'yarn'
21+
22+
- uses: actions/cache@v2
23+
id: yarn-cache
24+
with:
25+
path: '**/node_modules'
26+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
2027

2128
- name: Install Dependencies
29+
if: steps.yarn-cache.outputs.cache-hit != 'true'
2230
run: yarn install --frozen-lockfile --silent --non-interactive
2331

2432
- name: Test

src/views/popup.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEffect, useState } from 'react';
22

3-
import { description as pkgDescription, version as pkgVersion } from '../../package.json';
3+
import { description as pkgDescription } from '../../package.json';
44

55
import { DEFAULT_DATE_FORMAT, daysBetween, formatMoney, isSameDate, totalize } from '../core/utils';
66
import { load } from '../core/storage';
@@ -23,6 +23,8 @@ import RateUs from '../components/RateUs';
2323

2424
import logo from '../favicon.svg';
2525

26+
const version = process.env.VERSION;
27+
2628
const Popup = () => {
2729
const [invoice, setInvoice] = useState<Invoice>({});
2830
const [referenceMonth, setReferenceMonth] = useState(new Date());
@@ -59,7 +61,7 @@ const Popup = () => {
5961
return (
6062
<Container style={{ width: '18rem' }}>
6163
<Hero logo={logo}>
62-
{pkgDescription} v{pkgVersion}
64+
{pkgDescription} v{version}
6365
</Hero>
6466
<Row title="Reference / Due on" icon="calendar-range">
6567
<Col>

vite.config.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ const compress = (fileName: string) => {
5858
@typescript-eslint/no-unsafe-member-access */
5959
};
6060

61-
const getReleaseName = () =>
62-
`dist/${process.env.npm_package_name || 'error'}-v${process.env.npm_package_version || 'error'}.zip`;
61+
const getReleaseName = () => {
62+
const version = process.env.VERSION;
63+
64+
return `dist/${process.env.npm_package_name || 'error'}-v${version || 'error'}.zip`;
65+
};
6366

6467
export default defineConfig({
6568
build: {
@@ -80,7 +83,7 @@ export default defineConfig({
8083
transform: (contents) =>
8184
contents
8285
.toString()
83-
.replace('$version', process.env.npm_package_version)
86+
.replace('$version', process.env.VERSION)
8487
.replace(/\$name/g, process.env.npm_package_description)
8588
}
8689
]

0 commit comments

Comments
 (0)