update contributing

pull/2910/head
Mikael Finstad 1 month ago
parent 25c2da8154
commit 26060348b7
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -90,7 +90,7 @@ Before releasing, consider [Maintainence chores](#maintainence-chores) first.
- `git checkout master` - `git checkout master`
- `git merge stores` (in case there's an old unmerged stores hotfix) - `git merge stores` (in case there's an old unmerged stores hotfix)
- **Manually prepare release notes** from [commit history](https://github.com/mifi/lossless-cut/commits/master/) since last version. - **Manually prepare release notes** from commit history (use `node script/getCommits.ts` to assist)
- Create a new file `versions/x.y.z.md` and write the most important highlights from the release notes, but **remove github issue #references** - Create a new file `versions/x.y.z.md` and write the most important highlights from the release notes, but **remove github issue #references**
- `node script/generateVersions.ts && git add versions/*.md src/renderer/src/versions.json && git commit -m 'Update change log'` - `node script/generateVersions.ts && git add versions/*.md src/renderer/src/versions.json && git commit -m 'Update change log'`
- *If Store-only hotfix release* - *If Store-only hotfix release*
@ -140,11 +140,7 @@ How to check the value:
yarn pack-mas-dev yarn pack-mas-dev
cat dist/mas-dev-arm64/LosslessCut.app/Contents/Info.plist cat dist/mas-dev-arm64/LosslessCut.app/Contents/Info.plist
``` ```
Look for the key `LSMinimumSystemVersion`.
```xml
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
```
`LSMinimumSystemVersion` can be overridden in `electron-builder` by [`mac.minimumSystemVersion`](https://www.electron.build/configuration/mac.html) `LSMinimumSystemVersion` can be overridden in `electron-builder` by [`mac.minimumSystemVersion`](https://www.electron.build/configuration/mac.html)
@ -157,11 +153,22 @@ Links:
## Maintainence chores ## Maintainence chores
### Keep dependencies up to date ### Upgrade FFmpeg
- FFmpeg: [ffmpeg-build-script](https://github.com/mifi/ffmpeg-build-script), [ffmpeg-builds](https://github.com/mifi/ffmpeg-builds) and [package.json](./package.json) download scripts.
- [ffmpeg-build-script](https://github.com/mifi/ffmpeg-build-script)
- [ffmpeg-builds](https://github.com/mifi/ffmpeg-builds)
- [package.json](./package.json) download scripts.
### Upgrade Electron
- `electron` and upgrade [electron.vite.config.ts](./electron.vite.config.ts) `target`s. - `electron` and upgrade [electron.vite.config.ts](./electron.vite.config.ts) `target`s.
- `@electron/remote` - `@electron/remote`
- `package.json` / `yarn.lock`
### Keep dependencies up to date
```bash
yarn upgrade-interactive
```
### i18n strings / Weblate ### i18n strings / Weblate

@ -0,0 +1,39 @@
import { execa } from 'execa';
import assert from 'node:assert';
import { DateTime } from 'luxon';
// Find the most recent tag that starts with `v` (if any)
const ps1 = await execa('git', ['describe', '--tags', '--abbrev=0', '--match', 'v*']);
const tag = ps1.stdout.trim();
assert(tag, 'Tag not found');
// Use record separator (RS) and field separator (FS) to split commits and fields reliably
const RS = '\u001E';
const FS = '\u001F';
const format = `%H${FS}%cI${FS}%an <%ae>${FS}%B${RS}`;
const args = tag ? ['log', `${tag}..HEAD`, `--pretty=format:${format}`] : ['log', `--pretty=format:${format}`];
const ps2 = await execa('git', args);
assert(ps2.stdout);
const commits = ps2.stdout
.split(RS)
.map((s) => s.trim())
.filter(Boolean)
.map((s) => {
const [hash, date, author, ...bodyParts] = s.split(FS);
assert(date);
const body = bodyParts.join(FS).trim();
return { hash: hash?.trim(), date: date?.trim(), author: author?.trim(), message: body };
});
const out = commits
.filter((c) => (
!c.author?.startsWith('dependabot[bot] ')
&& !c.message.startsWith('Translated using Weblate')
&& !c.message.startsWith('Merge pull request')
))
.map((c) => `https://github.com/mifi/lossless-cut/commit/${c.hash}\n${DateTime.fromISO(c.date).toISODate()} - ${c.author}\n\n${c.message}`)
.join('\n\n\n------\n');
console.log(out);
Loading…
Cancel
Save