Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/nightly-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
8 changes: 7 additions & 1 deletion .github/scripts/set-tauri-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ if (updaterEndpoint && !updaterEndpoint.startsWith('https://')) {

const file = 'src-tauri/tauri.conf.json';
const config = JSON.parse(readFileSync(file, 'utf8'));
config.version = version;

// Sanitize hyphens in prerelease portion for Apple iOS bundle-version compatibility (requires numbers separated by '.')
const sanitizedVersion = version.replace(/^(\d+\.\d+\.\d+-nightly)\.(.+)$/, (_, prefix, build) => {
return `${prefix}.${build.replace(/-/g, '.')}`;
});

config.version = sanitizedVersion;
if (updaterEndpoint) {
config.plugins.updater.endpoints = [updaterEndpoint];
}
Expand Down
Loading