fix(ci): make build success not time dependent lmao (#1230)

<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->

Fixes #

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
This commit is contained in:
7w1 authored and GitHub committed 2026-07-22 20:26:48 -05:00
commit c243b77158
2 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -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}`);
+6 -2
View File
@@ -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;