From 9a897ef3a76a2070098ed15a7cfe923a30e1cc05 Mon Sep 17 00:00:00 2001 From: nicwands Date: Fri, 8 May 2026 13:28:46 -0400 Subject: [PATCH] release docs readme --- README.md | 17 +++++++++++++++++ bin/uploadArtifacts.js | 10 +++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9c0cfae..1df8414 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,20 @@ $ npm run build:mac # For 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 -m "Release " +$ git push --tags +``` + +Run the release script to build and package the application and upload it to the SeaweedFS bucket. + +```bash +$ npm run release: +``` diff --git a/bin/uploadArtifacts.js b/bin/uploadArtifacts.js index 82dce78..48ea419 100644 --- a/bin/uploadArtifacts.js +++ b/bin/uploadArtifacts.js @@ -19,7 +19,7 @@ const client = new S3Client({ }, }) -function getContentType(file) { +const getContentType = (file) => { if (file.endsWith('.yml')) return 'text/yaml' if (file.endsWith('.json')) return 'application/json' if (file.endsWith('.AppImage')) return 'application/octet-stream' @@ -30,7 +30,7 @@ function getContentType(file) { return 'application/octet-stream' } -function getCurrentTag() { +const getCurrentTag = () => { try { const tag = execSync('git describe --tags --exact-match 2>/dev/null', { encoding: 'utf8', @@ -42,7 +42,7 @@ function getCurrentTag() { } } -function isGitTagDirty() { +const isGitTagDirty = () => { try { const status = execSync('git status --porcelain', { 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 fileName = path.basename(filePath) 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 version = process.argv[3]