Skip to content

Commit

Permalink
Updated build Git workflow, bumped version number, updated Flathub pr…
Browse files Browse the repository at this point in the history
…ep process
  • Loading branch information
ransome1 committed Oct 30, 2023
1 parent c2813a3 commit cbb3605
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 41 deletions.
7 changes: 2 additions & 5 deletions .erb/scripts/update-version-numbers.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
const fs = require('fs');
const packageJson = require('../../release/app/package.json');
const { format } = require('date-fns'); // You may need to install this library using `yarn add date-fns` if you haven't already.
const dayjs = require('dayjs');

// Update the .flatpak/com.github.ransome1.sleek.desktop file
let desktopContent = fs.readFileSync('../../flatpak/com.github.ransome1.sleek.desktop', 'utf8');
desktopContent = desktopContent.replace(/Version=.*\n/, `Version=${packageJson.version}\n`);
fs.writeFileSync('../../flatpak/com.github.ransome1.sleek.desktop', desktopContent);

console.log('Updated com.github.ransome1.sleek.desktop with version', packageJson.version);

// Update the com.github.ransome1.sleek.appdata.xml file
let appdataContent = fs.readFileSync('../../flatpak/com.github.ransome1.sleek.appdata.xml', 'utf8');
const today = new Date();
const formattedDate = format(today, 'yyyy-MM-dd');
const formattedDate = dayjs(new Date()).format('YYYY-MM-DD');
appdataContent = appdataContent.replace(/<release version=".*?" date=".*?"\/>/, `<release version="${packageJson.version}" date="${formattedDate}"/>`);
fs.writeFileSync('../../flatpak/com.github.ransome1.sleek.appdata.xml', appdataContent);

Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- '*'
jobs:
trigger-flathub_build:
name: Trigger Flathub build bot
runs-on: ubuntu-latest
steps:
- name: Trigger Flathub build
Expand All @@ -22,16 +23,15 @@ jobs:
os: [macos-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache: 'yarn'
- name: Install and build
run: |
yarn
yarn run postinstall
yarn run build
- name: Run Electron Builder
uses: coparse-inc/[email protected]
Expand All @@ -52,16 +52,15 @@ jobs:
os: [windows-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache: 'yarn'
- name: Install and build
run: |
yarn
yarn run postinstall
yarn run build
- name: Run Electron Builder
uses: coparse-inc/[email protected]
Expand All @@ -77,16 +76,15 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache: 'yarn'
- name: Install and build
run: |
yarn
yarn run postinstall
yarn run build
- name: Run Electron Builder
uses: coparse-inc/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion flatpak/com.github.ransome1.sleek.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<developer_name>Robin Ahle</developer_name>
<content_rating type="oars-1.1"/>
<releases>
<release version="2.0.0-dev20" date="2023-10-29"/>
<release version="2.0.0-dev20" date="2023-10-30"/>
</releases>
<url type="homepage">https://github.com/ransome1/sleek</url>
<url type="contact">https://github.com/ransome1/sleek/issues</url>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"start:main": "cross-env NODE_ENV=development electronmon -r ts-node/register/transpile-only .",
"start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts",
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
"test": "jest"
"test": "jest",
"depcheck": "depcheck"
},
"browserslist": [],
"prettier": {
Expand Down Expand Up @@ -80,7 +81,6 @@
"i18next": "^23.5.1",
"jstodotxt": "^1.0.0-alpha.0",
"material-ui-popup-state": "^5.0.9",
"mock-fs": "^5.2.0",
"peggy": "^3.0.2",
"react": "^18.2.0",
"react-autosuggest": "^10.1.0",
Expand All @@ -106,13 +106,13 @@
"@types/webpack-bundle-analyzer": "^4.6.0",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"browserslist-config-erb": "^0.0.3",
"chalk": "^4.1.2",
"concurrently": "^8.1.0",
"core-js": "^3.30.2",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.0",
"depcheck": "^1.4.7",
"detect-port": "^1.5.1",
"electron": "^25.8.1",
"electron-builder": "^24.2.1",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/Drawer/Attributes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
padding: 0;
margin: 0;
.MuiBadge-badge {
background: red;
background: #FF3860;
}
&.Mui-expanded {
min-height: auto;
Expand Down
Loading

0 comments on commit cbb3605

Please sign in to comment.