1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-04-11 11:12:03 +02:00

Tools: Fixed server tags

This commit is contained in:
Laurent Cozic 2021-09-29 17:55:54 +01:00
parent 7e7616405b
commit e96713d8cf
2 changed files with 9 additions and 7 deletions

View File

@ -8,8 +8,11 @@ export function getVersionFromTag(tagName: string, isPreRelease: boolean): strin
return s[1].substr(1) + suffix;
}
export function getIsPreRelease(tagName: string): boolean {
return tagName.indexOf('-beta') > 0;
export function getIsPreRelease(_tagName: string): boolean {
// For now we only create pre-releases from CI. It's after, once the release
// has been proven stable, that it is tagged as "latest".
return true;
// return tagName.indexOf('-beta') > 0;
}
async function main() {
@ -30,8 +33,7 @@ async function main() {
const buildArgs = `--build-arg BUILD_DATE="${buildDate}" --build-arg REVISION="${revision}" --build-arg VERSION="${imageVersion}"`;
const dockerTags: string[] = [];
const versionPart = imageVersion.split('.');
// dockerTags.push(isPreRelease ? 'beta' : 'latest');
dockerTags.push('beta');
dockerTags.push(isPreRelease ? 'beta' : 'latest');
dockerTags.push(versionPart[0] + (isPreRelease ? '-beta' : ''));
dockerTags.push(`${versionPart[0]}.${versionPart[1]}${isPreRelease ? '-beta' : ''}`);
dockerTags.push(imageVersion);

View File

@ -7,18 +7,18 @@ async function main() {
// if (!['release', 'prerelease'].includes(argv.type)) throw new Error('Must specify release type. Either --type=release or --type=prerelease');
// const isPreRelease = argv.type === 'prerelease';
const isPreRelease = false;
// const isPreRelease = false;
await gitPullTry();
process.chdir(serverDir);
const version = (await execCommand2('npm version patch')).trim();
const versionSuffix = isPreRelease ? '-beta' : '';
const versionSuffix = ''; // isPreRelease ? '-beta' : '';
const tagName = `server-${version}${versionSuffix}`;
const changelogPath = `${rootDir}/readme/changelog_server.md`;
await completeReleaseWithChangelog(changelogPath, version, tagName, 'Server', isPreRelease);
await completeReleaseWithChangelog(changelogPath, version, tagName, 'Server', false);
}
main().catch((error) => {