release docs readme

This commit is contained in:
nicwands
2026-05-08 13:28:46 -04:00
parent a43c3221da
commit 9a897ef3a7
2 changed files with 22 additions and 5 deletions

View File

@@ -32,3 +32,20 @@ $ npm run build:mac
# For Linux # For Linux
$ npm run build:linux $ npm run build:linux
``` ```
### Releasing Versions
Before releasing a new version, make sure that all code is committed and pushed to the remote repository. Then, update the version number in `package.json`.
Create a new release tag and push it to the remote repository.
```bash
$ git tag -a <version> -m "Release <version>"
$ git push --tags
```
Run the release script to build and package the application and upload it to the SeaweedFS bucket.
```bash
$ npm run release:<platform>
```

View File

@@ -19,7 +19,7 @@ const client = new S3Client({
}, },
}) })
function getContentType(file) { const getContentType = (file) => {
if (file.endsWith('.yml')) return 'text/yaml' if (file.endsWith('.yml')) return 'text/yaml'
if (file.endsWith('.json')) return 'application/json' if (file.endsWith('.json')) return 'application/json'
if (file.endsWith('.AppImage')) return 'application/octet-stream' if (file.endsWith('.AppImage')) return 'application/octet-stream'
@@ -30,7 +30,7 @@ function getContentType(file) {
return 'application/octet-stream' return 'application/octet-stream'
} }
function getCurrentTag() { const getCurrentTag = () => {
try { try {
const tag = execSync('git describe --tags --exact-match 2>/dev/null', { const tag = execSync('git describe --tags --exact-match 2>/dev/null', {
encoding: 'utf8', encoding: 'utf8',
@@ -42,7 +42,7 @@ function getCurrentTag() {
} }
} }
function isGitTagDirty() { const isGitTagDirty = () => {
try { try {
const status = execSync('git status --porcelain', { const status = execSync('git status --porcelain', {
encoding: 'utf8', encoding: 'utf8',
@@ -54,7 +54,7 @@ function isGitTagDirty() {
} }
} }
async function uploadFile(filePath, platform, version) { const uploadFile = async (filePath, platform, version) => {
const fileStream = fs.createReadStream(filePath) const fileStream = fs.createReadStream(filePath)
const fileName = path.basename(filePath) const fileName = path.basename(filePath)
const key = `${platform}/${version}/${fileName}` const key = `${platform}/${version}/${fileName}`
@@ -71,7 +71,7 @@ async function uploadFile(filePath, platform, version) {
) )
} }
async function main() { const main = async () => {
const platform = process.argv[2] const platform = process.argv[2]
const version = process.argv[3] const version = process.argv[3]