Skip to content

Commit 3e357b3

Browse files
Add version number to macOS
1 parent 9ae6a9e commit 3e357b3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/build.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,14 @@ try {
116116
if (process.platform === 'darwin') {
117117
console.log('\x1b[36mCreating macOS zip file...\x1b[0m');
118118
try {
119+
// Read version from package.json
120+
const packagePath = path.join(__dirname, '..', 'package.json');
121+
const packageData = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
122+
const version = packageData.version;
123+
119124
const distPath = path.join(__dirname, '..', 'dist');
120125
const macAppPath = path.join(distPath, 'mac', 'Sploder.app');
121-
const zipFileName = 'Sploder-macOS.zip';
126+
const zipFileName = `Sploder-macOS-${version}.zip`;
122127
const zipFilePath = path.join(distPath, zipFileName);
123128

124129
// Check if the .app directory exists

0 commit comments

Comments
 (0)