1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Tools: Fixed CI for macOS build

This commit is contained in:
Laurent Cozic 2021-06-10 17:02:52 +02:00
parent e617e6fab3
commit 7c93e268e4
4 changed files with 6 additions and 8 deletions

View File

@ -11,6 +11,7 @@ IS_PULL_REQUEST=0
IS_DEV_BRANCH=0 IS_DEV_BRANCH=0
IS_LINUX=0 IS_LINUX=0
IS_MACOS=0 IS_MACOS=0
IS_CONTINUOUS_INTEGRATION=1
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
IS_PULL_REQUEST=1 IS_PULL_REQUEST=1

View File

@ -1,5 +1,3 @@
[![Travis Build Status](https://travis-ci.com/laurent22/joplin.svg?branch=master)](https://travis-ci.com/laurent22/joplin) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/laurent22/joplin?branch=master&passingText=master%20-%20OK&svg=true)](https://ci.appveyor.com/project/laurent22/joplin)
# Building the applications # Building the applications
The Joplin source code is hosted on a [monorepo](https://en.wikipedia.org/wiki/Monorepo) managed by Lerna. The usage of Lerna is mostly transparent as the needed commands have been moved to the root package.json and thus are invoked for example when running `npm install` or `npm run watch`. The main thing to know about Lerna is that it links the packages in the monorepo using `npm link`, so if you check the node_modules directory you will see links instead of actual directories for certain packages. This is something to keep in mind as these links can cause issues in some cases. The Joplin source code is hosted on a [monorepo](https://en.wikipedia.org/wiki/Monorepo) managed by Lerna. The usage of Lerna is mostly transparent as the needed commands have been moved to the root package.json and thus are invoked for example when running `npm install` or `npm run watch`. The main thing to know about Lerna is that it links the packages in the monorepo using `npm link`, so if you check the node_modules directory you will see links instead of actual directories for certain packages. This is something to keep in mind as these links can cause issues in some cases.

View File

@ -27,7 +27,7 @@ module.exports = async function() {
// Use stdio: 'pipe' so that execSync doesn't print error directly to stdout // Use stdio: 'pipe' so that execSync doesn't print error directly to stdout
branch = execSync('git rev-parse --abbrev-ref HEAD', { stdio: 'pipe' }).toString().trim(); branch = execSync('git rev-parse --abbrev-ref HEAD', { stdio: 'pipe' }).toString().trim();
hash = execSync('git log --pretty="%h" -1', { stdio: 'pipe' }).toString().trim(); hash = execSync('git log --pretty="%h" -1', { stdio: 'pipe' }).toString().trim();
// The builds in CI are done from a 'detached HEAD' state, thus the branch name will be 'HEAD' for Travis builds. // The builds in CI are done from a 'detached HEAD' state, thus the branch name will be 'HEAD' for CI builds.
} catch (err) { } catch (err) {
// Don't display error object as it's a "fatal" error, but // Don't display error object as it's a "fatal" error, but
// not for us, since is it not critical information // not for us, since is it not critical information

View File

@ -25,8 +25,8 @@ module.exports = async function(params) {
console.info('Checking if notarization should be done...'); console.info('Checking if notarization should be done...');
if (!process.env.TRAVIS || !process.env.TRAVIS_TAG) { if (!process.env.IS_CONTINUOUS_INTEGRATION || !process.env.GIT_TAG_NAME) {
console.info(`Either not running in CI or not processing a tag - skipping notarization. process.env.TRAVIS = ${process.env.TRAVIS}; process.env.TRAVIS_TAG = ${process.env.TRAVIS}`); console.info(`Either not running in CI or not processing a tag - skipping notarization. process.env.IS_CONTINUOUS_INTEGRATION = ${process.env.IS_CONTINUOUS_INTEGRATION}; process.env.GIT_TAG_NAME = ${process.env.GIT_TAG_NAME}`);
return; return;
} }
@ -45,9 +45,8 @@ module.exports = async function(params) {
console.log(`Notarizing ${appId} found at ${appPath}`); console.log(`Notarizing ${appId} found at ${appPath}`);
// Every x seconds we print something to stdout, otherwise Travis will // Every x seconds we print something to stdout, otherwise CI may timeout
// timeout the task after 10 minutes, and Apple notarization can take more // the task after 10 minutes, and Apple notarization can take more time.
// time.
const waitingIntervalId = setInterval(() => { const waitingIntervalId = setInterval(() => {
console.log('.'); console.log('.');
}, 60000); }, 60000);