1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Seamless-Updates: added latest-mac-arm64.yml (#10941)

This commit is contained in:
Alice 2024-08-31 17:42:07 +03:00 committed by GitHub
parent 4ccc46e4db
commit 3bca12fd4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 35 additions and 5 deletions

View File

@ -83,4 +83,4 @@ jobs:
npm pkg set 'build.mac.identity'=null --json
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn dist --mac --arm64 --publish=never
fi
fi

View File

@ -2,13 +2,14 @@ const fs = require('fs');
const path = require('path');
const os = require('os');
const sha512 = require('js-sha512');
const distDirName = 'dist';
const distPath = path.join(__dirname, distDirName);
const generateChecksumFile = () => {
if (os.platform() !== 'linux') {
return []; // SHA-512 is only for AppImage
}
const distDirName = 'dist';
const distPath = path.join(__dirname, distDirName);
let appImageName = '';
const files = fs.readdirSync(distPath);
for (const key in files) {
@ -30,4 +31,8 @@ const generateChecksumFile = () => {
return [sha512FilePath];
};
exports.default = generateChecksumFile;
const mainHook = () => {
generateChecksumFile();
};
exports.default = mainHook;

View File

@ -0,0 +1,25 @@
const fs = require('fs');
const path = require('path');
const os = require('os');
const distDirName = 'dist';
const distPath = path.join(__dirname, distDirName);
const renameLatestYmlFile = () => {
if (os.platform() === 'darwin' && process.arch === 'arm64') {
const latestMacFilePath = path.join(distPath, 'latest-mac.yml');
const renamedMacFilePath = path.join(distPath, 'latest-mac-arm64.yml');
if (fs.existsSync(latestMacFilePath)) {
fs.renameSync(latestMacFilePath, renamedMacFilePath);
return [renamedMacFilePath];
} else {
throw new Error('latest-mac.yml not found!');
}
}
};
const mainHook = () => {
renameLatestYmlFile();
};
exports.default = mainHook;

View File

@ -41,7 +41,7 @@
"build/tesseract.js-core/**",
"build/7zip/**"
],
"afterAllArtifactBuild": "./generateSha512.js",
"afterAllArtifactBuild": "./afterAllArtifactBuild.js",
"asar": true,
"asarUnpack": "./node_modules/node-notifier/vendor/**",
"win": {