Skip to content

Commit

Permalink
Updated scripts, updated read me
Browse files Browse the repository at this point in the history
  • Loading branch information
ransome1 committed Nov 2, 2023
1 parent 755d485 commit a6a1b23
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
15 changes: 10 additions & 5 deletions .erb/scripts/update-version-numbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const fs = require('fs');
const packageJson = require('../../release/app/package.json');
const dayjs = require('dayjs');

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);
let desktopFileContent = fs.readFileSync('../../flatpak/com.github.ransome1.sleek.desktop', 'utf8');
desktopFileContent = desktopFileContent.replace(/Version=.*\n/, `Version=${packageJson.version}\n`);
fs.writeFileSync('../../flatpak/com.github.ransome1.sleek.desktop', desktopFileContent);

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

Expand All @@ -15,9 +15,14 @@ fs.writeFileSync('../../flatpak/com.github.ransome1.sleek.appdata.xml', appdataC

console.log('Updated com.github.ransome1.sleek.appdata.xml with version', packageJson.version, 'and date', formattedDate);

// Update the snapcraft.yaml file
let snapcraftContent = fs.readFileSync('../../snap/snapcraft.yaml', 'utf8');
snapcraftContent = snapcraftContent.replace(/version: ".*?"/, `version: "${packageJson.version}"`);
fs.writeFileSync('../../snap/snapcraft.yaml', snapcraftContent);

console.log('Updated snapcraft.yaml with version', packageJson.version);
console.log('Updated snapcraft.yaml with version', packageJson.version);

let mainPackageJsonContent = fs.readFileSync('../../package.json', 'utf8');
mainPackageJsonContent = mainPackageJsonContent.replace(/version": ".*?"/, `version": "${packageJson.version}"`);
fs.writeFileSync('../../package.json', mainPackageJsonContent);

console.log('Updated package.json with version', packageJson.version);
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. Stripp

All classic todo.txt attributes are supported and enhanced by additional features. Creating todos is straightforward, and tag-based filtering in tandem with highly customisable grouping and smart full-text search allows for rapid information retrieval. Completed todos can be hidden or archived into separate done.txt files. Easy integration with other todo.txt apps is facilitated by continuously scanning todo.txt files for changes.

sleek is available for Windows, macOS and Linux, and in several languages. [For more detailed information, please refer to the sleek wiki](https://github.com/ransome1/sleek/wiki).
sleek is available for Windows, macOS and Linux, and in several languages. [Screenshots can be found here](https://github.com/ransome1/sleek/wiki/Screenshots). For more detailed information, [please refer to the sleek wiki](https://github.com/ransome1/sleek/wiki).

### ❤️ Sponsor sleek
Pushing sleek to the Apple and Microsoft app stores creates annual costs. You can help covering these by [sponsoring the project](https://github.com/sponsors/ransome1).
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.2" date="2023-11-01"/>
<release version="2.0.2" date="2023-11-02"/>
</releases>
<url type="homepage">https://github.com/ransome1/sleek</url>
<url type="contact">https://github.com/ransome1/sleek/issues</url>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "sleek",
"version": "2.0.2",
"main": "./src/main/main.ts",
"scripts": {
"build": "concurrently \"yarn run peggy\" \"yarn run build:main\" \"yarn run build:renderer\"",
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { translatedAttributes } from './Shared';
import Prompt from './Prompt';
import './App.scss';

const environment = process.env.NODE_ENV;
const { ipcRenderer, store } = window.api;

const App = () => {
Expand Down Expand Up @@ -197,6 +198,8 @@ const App = () => {

useEffect(() => {
const anonymousUserId = store.get('anonymousUserId');
const matomoContainer = (environment === 'development') ? 'https://www.datenkrake.eu/matomo/js/container_WVsEueTV_dev_a003c77410fd43f247329b3b.js' : 'https://www.datenkrake.eu/matomo/js/container_WVsEueTV.js';

if(anonymousUserId && matomo) {
var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
Expand All @@ -206,7 +209,7 @@ const App = () => {
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.async = true;
g.src = 'https://www.datenkrake.eu/matomo/js/container_WVsEueTV.js';
g.src = matomoContainer;
s.parentNode.insertBefore(g, s);
}
}, [matomo]);
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@ const NavigationComponent: React.FC<Props> = ({
<Box>sleek</Box>
{files.length > 0 && (
<>
<Button onClick={() => setDialogOpen(true)}>
<Button onClick={() => setDialogOpen(true)} data-testid='navigation-button-add-todo'>
<AddIcon />
</Button>
<Button onClick={() => setIsDrawerOpen(prevIsDrawerOpen => !prevIsDrawerOpen)} className={isDrawerOpen ? 'active' : ''}>
<Button onClick={() => setIsDrawerOpen(prevIsDrawerOpen => !prevIsDrawerOpen)} className={isDrawerOpen ? 'active' : ''} data-testid='navigation-button-drawer'>
<FilterAltIcon />
</Button>
</>
)}
<Button onClick={() => ipcRenderer.send('openFile')}>
<Button onClick={() => ipcRenderer.send('openFile')} data-testid='navigation-button-open-file'>
<FileOpenIcon />
</Button>
<Button className='break' onClick={() => setIsSettingsOpen(true)}>
<Button className='break' onClick={() => setIsSettingsOpen(true)} data-testid='navigation-button-settings'>
<SettingsIcon />
</Button>
<Button onClick={() => setIsNavigationOpen(prevIsNavigationOpen => !prevIsNavigationOpen)}>
<KeyboardArrowLeftIcon />
</Button>
</Box>
<Button onClick={() => setIsNavigationOpen(prevIsNavigationOpen => !prevIsNavigationOpen)} className="showNavigation">
<Button onClick={() => setIsNavigationOpen(prevIsNavigationOpen => !prevIsNavigationOpen)} className='showNavigation' data-testid='navigation-button-hide-navigation'>
<KeyboardArrowRightIcon />
</Button>
</>
Expand Down

0 comments on commit a6a1b23

Please sign in to comment.