1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
This commit is contained in:
Laurent Cozic 2021-06-11 18:24:18 +02:00
parent babc0432a9
commit 48bb4f0307
2 changed files with 30 additions and 60 deletions

View File

@ -12,26 +12,6 @@ IS_DEV_BRANCH=0
IS_LINUX=0
IS_MACOS=0
GIT_TAG_NAME=server-v2.0.7
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
IS_PULL_REQUEST=1
fi
@ -79,26 +59,26 @@ npm install
# want it to randomly fail when trying to create a desktop release.
# =============================================================================
# if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
# npm run test-ci
# testResult=$?
# if [ $testResult -ne 0 ]; then
# exit $testResult
# fi
# fi
if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
npm run test-ci
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
fi
fi
# =============================================================================
# Run linter for pull requests only. We also don't want this to make the desktop
# release randomly fail.
# =============================================================================
# if [ "$IS_PULL_REQUEST" != "1" ]; then
# npm run linter-ci ./
# testResult=$?
# if [ $testResult -ne 0 ]; then
# exit $testResult
# fi
# fi
if [ "$IS_PULL_REQUEST" != "1" ]; then
npm run linter-ci ./
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
fi
fi
# =============================================================================
# Validate translations - this is needed as some users manually edit .po files
@ -106,15 +86,15 @@ npm install
# for Linux only is sufficient.
# =============================================================================
# if [ "$IS_PULL_REQUEST" == "1" ]; then
# if [ "$IS_LINUX" == "1" ]; then
# node packages/tools/validate-translation.js
# testResult=$?
# if [ $testResult -ne 0 ]; then
# exit $testResult
# fi
# fi
# fi
if [ "$IS_PULL_REQUEST" == "1" ]; then
if [ "$IS_LINUX" == "1" ]; then
node packages/tools/validate-translation.js
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
fi
fi
fi
# =============================================================================
# Find out if we should run the build or not. Electron-builder gets stuck when
@ -123,11 +103,11 @@ npm install
# https://github.com/electron-userland/electron-builder/issues/4263
# =============================================================================
# if [ "$IS_PULL_REQUEST" == "1" ]; then
# if [ "$IS_MACOS" == "1" ]; then
# exit 0
# fi
# fi
if [ "$IS_PULL_REQUEST" == "1" ]; then
if [ "$IS_MACOS" == "1" ]; then
exit 0
fi
fi
# =============================================================================
# Prepare the Electron app and build it

View File

@ -11,18 +11,8 @@ async function main() {
process.chdir(serverDir);
const version = (await execCommand2('npm version patch')).trim();
// const versionShort = version.substr(1);
// const imageVersion = versionShort + (isPreRelease ? '-beta' : '');
const tagName = `server-${version}`;
// process.chdir(rootDir);
// console.info(`Running from: ${process.cwd()}`);
// await execCommand2(`docker build -t "joplin/server:${imageVersion}" -f Dockerfile.server .`);
// await execCommand2(`docker tag "joplin/server:${imageVersion}" "joplin/server:latest"`);
// await execCommand2(`docker push joplin/server:${imageVersion}`);
// if (!isPreRelease) await execCommand2('docker push joplin/server:latest');
const versionSuffix = isPreRelease ? '-beta' : '';
const tagName = `server-${version}${versionSuffix}`;
const changelogPath = `${rootDir}/readme/changelog_server.md`;
await completeReleaseWithChangelog(changelogPath, version, tagName, 'Server', isPreRelease);