Skip to content

Commit

Permalink
Tools: Fixed CI for macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Jun 10, 2021
1 parent e617e6f commit 7c93e26
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/scripts/run_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ IS_PULL_REQUEST=0
IS_DEV_BRANCH=0
IS_LINUX=0
IS_MACOS=0
IS_CONTINUOUS_INTEGRATION=1

if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
IS_PULL_REQUEST=1
Expand Down
2 changes: 0 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -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

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.
Expand Down
2 changes: 1 addition & 1 deletion packages/app-desktop/tools/compile-package-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = async function() {
// 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();
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) {
// Don't display error object as it's a "fatal" error, but
// not for us, since is it not critical information
Expand Down
9 changes: 4 additions & 5 deletions packages/app-desktop/tools/notarizeMacApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ module.exports = async function(params) {

console.info('Checking if notarization should be done...');

if (!process.env.TRAVIS || !process.env.TRAVIS_TAG) {
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}`);
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.IS_CONTINUOUS_INTEGRATION = ${process.env.IS_CONTINUOUS_INTEGRATION}; process.env.GIT_TAG_NAME = ${process.env.GIT_TAG_NAME}`);
return;
}

Expand All @@ -45,9 +45,8 @@ module.exports = async function(params) {

console.log(`Notarizing ${appId} found at ${appPath}`);

// Every x seconds we print something to stdout, otherwise Travis will
// timeout the task after 10 minutes, and Apple notarization can take more
// time.
// Every x seconds we print something to stdout, otherwise CI may timeout
// the task after 10 minutes, and Apple notarization can take more time.
const waitingIntervalId = setInterval(() => {
console.log('.');
}, 60000);
Expand Down

0 comments on commit 7c93e26

Please sign in to comment.