mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 17:11:17 -08:00
fix(ci): make build success not time dependent lmao
This commit is contained in:
1 parent
c03d7f0ed7
commit
ed65dc6a8d
2 files changed
+7
-3
No files matched your search
@@ -34,7 +34,7 @@ const day = String(timestamp.getUTCDate()).padStart(2, '0');
|
||||
const hours = String(timestamp.getUTCHours()).padStart(2, '0');
|
||||
const minutes = String(timestamp.getUTCMinutes()).padStart(2, '0');
|
||||
|
||||
const timeIdentifier = `${year}${month}${day}.${hours}${minutes}`;
|
||||
const timeIdentifier = `${year}${month}${day}${hours}${minutes}`;
|
||||
|
||||
const [, major, minor, patch] = match;
|
||||
console.log(`${major}.${minor}.${Number(patch) + 1}-nightly.${timeIdentifier}`);
|
||||
@@ -24,9 +24,13 @@ if (updaterEndpoint && !updaterEndpoint.startsWith('https://')) {
|
||||
const file = 'src-tauri/tauri.conf.json';
|
||||
const config = JSON.parse(readFileSync(file, 'utf8'));
|
||||
|
||||
// Sanitize hyphens in prerelease portion for Apple iOS bundle-version compatibility (requires numbers separated by '.')
|
||||
// Sanitize hyphens and leading zeroes in prerelease portion for SemVer 2.0.0 and iOS compatibility
|
||||
const sanitizedVersion = version.replace(/^(\d+\.\d+\.\d+-nightly)\.(.+)$/, (_, prefix, build) => {
|
||||
return `${prefix}.${build.replace(/-/g, '.')}`;
|
||||
const sanitizedBuild = build
|
||||
.split(/[-.]/)
|
||||
.map((part) => (/^\d+$/.test(part) ? String(Number(part)) : part))
|
||||
.join('.');
|
||||
return `${prefix}.${sanitizedBuild}`;
|
||||
});
|
||||
|
||||
config.version = sanitizedVersion;
|
||||
|
||||
Reference in new issue
Block a user