aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.dockerignore2
-rw-r--r--.github/workflows/ferdi-builds.yml206
-rw-r--r--.travis.yml100
-rw-r--r--Dockerfile7
-rw-r--r--README.md4
-rw-r--r--appveyor.yml58
-rw-r--r--build-helpers/notarize.js2
m---------recipes0
8 files changed, 213 insertions, 166 deletions
diff --git a/.dockerignore b/.dockerignore
index 942a28a9f..00a94efd2 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -2,7 +2,6 @@
2.husky/ 2.husky/
3.stage 3.stage
4.tmp 4.tmp
5.travis.yml
6**/.DS_Store 5**/.DS_Store
7**/.env 6**/.env
8**/.git* 7**/.git*
@@ -15,7 +14,6 @@
15**/npm-debug.log* 14**/npm-debug.log*
16**/server*.log 15**/server*.log
17**/yarn-error.log 16**/yarn-error.log
18appveyor.yml
19Dockerfile 17Dockerfile
20flow-typed 18flow-typed
21out 19out
diff --git a/.github/workflows/ferdi-builds.yml b/.github/workflows/ferdi-builds.yml
new file mode 100644
index 000000000..199c3ca25
--- /dev/null
+++ b/.github/workflows/ferdi-builds.yml
@@ -0,0 +1,206 @@
1# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
4# Note: This workflow requires some secrets setup, and set on this repo with the names:
5 # 'FERDI_PUBLISH_TOKEN' (A GitHub Personal Access Token with appropriate permissions - for publishing the built artifacts)
6 # 'APPLEID' (The username of your Apple developer account - for notarizing the mac artifacts)
7 # 'APPLEID_PASSWORD' (An app-specific password - for notarizing the mac artifacts)
8 # 'CSC_LINK' (The HTTPS link or local path to certificate - for code signing of mac and windows artifacts)
9 # 'CSC_KEY_PASSWORD' (The password to decrypt the certificate given in CSC_LINK - for code signing of mac and windows artifacts)
10
11name: Ferdi Builds
12
13on:
14 # Push to any tracked branches
15 push:
16 branches: [develop, release, nightly]
17 # PRs only on develop branch
18 pull_request:
19 branches: [develop]
20 # Manual trigger from the UI
21 workflow_dispatch:
22 inputs:
23 message:
24 description: 'Message for build'
25 required: true
26 schedule:
27 - cron: '0 0 * * *' # every night at 12 am
28
29env:
30 USE_HARD_LINKS: false
31 # DEBUG: electron-builder
32
33jobs:
34 check_date:
35 runs-on: ubuntu-latest
36 name: Check latest commit
37 outputs:
38 should_run: ${{ steps.should_run.outputs.should_run }}
39 steps:
40 - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled'
41 uses: actions/checkout@v2
42 with:
43 ref: nightly
44 submodules: recursive
45 fetch-depth: 0
46 - name: Print latest commit
47 run: echo ${{ github.sha }}
48 - name: Setup git configs
49 run: |
50 git config user.name github-actions
51 git config user.email github-actions@github.com
52 - name: Merge from 'origin/develop' (continue if errored)
53 if: ${{ github.event_name == 'schedule' }}
54 continue-on-error: true
55 run: git merge --no-ff --no-verify --commit -m "Merge remote-tracking branch 'origin/develop' into HEAD" origin/develop
56 - name: Update submodules (continue if errored)
57 if: ${{ github.event_name == 'schedule' }}
58 continue-on-error: true
59 run: |
60 echo "Updating submodules"
61 git submodule update --remote -f
62
63 echo "Committing submodules"
64 git commit -am "Update submodules" --no-verify || true
65
66 echo "Running linter and tests"
67 npm run lint && npm run test
68
69 echo "Committing linter fixes"
70 git commit -am "Apply linter fixes" --no-verify || true
71 - name: Capture if this is a manually triggered forced rebuild
72 run: echo "FORCE_REBUILD=${{ contains(github.event.inputs.message, 'force build') }}" >> $GITHUB_ENV
73 - id: should_run
74 name: Check whether there are any commits since this run was last triggered and either push or set the output
75 if: ${{ github.event_name == 'schedule' || env.FORCE_REBUILD == 'true' }}
76 run: |
77 CHANGES_COUNT=$(git diff --shortstat origin/nightly | wc -l)
78 echo "Number of changes: $CHANGES_COUNT"
79 if [ $CHANGES_COUNT -eq 0 ] && [ $FORCE_REBUILD != "true" ]; then
80 echo "No changes found - terminating the build"
81 echo "::set-output name=should_run::false"
82 else
83 if [ $FORCE_REBUILD != "true" ]; then
84 echo "Bumping version number"
85 npm version prerelease --preid=nightly
86 fi
87
88 echo "Pushing merge, linter, submodule and version-bump commits"
89 git push origin nightly --no-verify
90 fi
91
92 build:
93 name: '${{ matrix.os }}'
94 needs: check_date
95 if: ${{ needs.check_date.outputs.should_run != 'false' }}
96 runs-on: ${{ matrix.os }}
97 strategy:
98 matrix:
99 os: [macos-10.15, ubuntu-20.04, windows-2019]
100 node-version: [14.16.1]
101 fail-fast: false
102 steps:
103 - name: Set env vars for macOS and Linux
104 if: startsWith(runner.os, 'macOS') || startsWith(runner.os, 'Linux')
105 run: |
106 echo "NPM_CACHE=$HOME/.npm" >> $GITHUB_ENV
107 echo "ELECTRON_CACHE=$HOME/.cache/electron" >> $GITHUB_ENV
108 echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV
109 echo "FORCE_REBUILD_ON_NIGHTLY=${{ contains(github.event.inputs.message, 'force build') && contains(github.event.inputs.message, 'nightly branch') }}" >> $GITHUB_ENV
110 - name: Set env vars for Windows
111 if: startsWith(runner.os, 'Windows')
112 run: |
113 echo "HOME=$USERPROFILE" >> $GITHUB_ENV
114 echo "NPM_CACHE=$USERPROFILE\.npm" >> $GITHUB_ENV
115 echo "ELECTRON_CACHE=$USERPROFILE\.cache\electron" >> $GITHUB_ENV
116 echo "ELECTRON_BUILDER_CACHE=$USERPROFILE\.cache\electron-builder" >> $GITHUB_ENV
117 echo "FORCE_REBUILD_ON_NIGHTLY=${{ contains(github.event.inputs.message, 'force build') && contains(github.event.inputs.message, 'nightly branch') }}" >> $GITHUB_ENV
118 shell: bash
119 - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch
120 uses: actions/checkout@v2
121 if: ${{ github.event_name == 'schedule' || env.FORCE_REBUILD_ON_NIGHTLY == 'true' }}
122 with:
123 submodules: recursive
124 ref: nightly
125 - name: Checkout code along with submodules for any branch if the trigger event is NOT 'scheduled' and this is NOT a forced rebuild on the nightly branch
126 uses: actions/checkout@v2
127 if: ${{ github.event_name != 'schedule' && env.FORCE_REBUILD_ON_NIGHTLY != 'true' }}
128 with:
129 submodules: recursive
130 - name: Extract Git branch name from the currently checked out branch (not from the branch where this run was kicked off)
131 run: echo "GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
132 shell: bash
133 - name: Cache node modules
134 uses: actions/cache@v2
135 env:
136 cache-name: cache-node-modules
137 with:
138 path: ${{ env.NPM_CACHE }}
139 key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
140 restore-keys: |
141 ${{ runner.os }}-build-${{ env.cache-name }}-
142 ${{ runner.os }}-build-
143 ${{ runner.os }}-
144 - name: Cache electron modules
145 uses: actions/cache@v2
146 env:
147 cache-name: cache-electron-modules
148 with:
149 key: ${{ runner.os }}-${{ env.cache-name }}
150 path: ${{ env.ELECTRON_CACHE }}
151 - name: Cache electron-builder modules
152 uses: actions/cache@v2
153 env:
154 cache-name: cache-electron-builder-modules
155 with:
156 key: ${{ runner.os }}-${{ env.cache-name }}
157 path: ${{ env.ELECTRON_BUILDER_CACHE }}
158 - name: Use Node.js ${{ matrix.node-version }}
159 uses: actions/setup-node@v2
160 with:
161 node-version: ${{ matrix.node-version }}
162 - name: Upgrade Xcode version on the macOS 10.15 default runners provided by GH Actions
163 if: startsWith(runner.os, 'macOS')
164 run: |
165 sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
166 sudo xcode-select -s "/Applications/Xcode_12.4.app"
167 - name: Uninstall locally and reinstall node-gyp globally
168 if: startsWith(runner.os, 'macOS') || startsWith(runner.os, 'Linux')
169 run: |
170 npm uninstall node-gyp
171 npm i -g node-gyp@8.0.0 && npm config set node_gyp "$(which node-gyp)"
172 - name: Install node dependencies recursively
173 run: npx lerna bootstrap
174 - name: Package recipes
175 run: npm i && npm run package
176 working-directory: ./recipes
177 - name: Run linter and tests
178 run: npm run lint && npm run test
179 - name: Build Ferdi without publish for any branch not 'nightly' and not 'release'
180 if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }}
181 run: npm run build
182 shell: bash
183 - name: Build Ferdi with publish for 'nightly' branch
184 if: ${{ env.GIT_BRANCH_NAME == 'nightly' }}
185 run: npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=nightlies
186 shell: bash
187 env:
188 GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }}
189 APPLEID: ${{ secrets.APPLEID }}
190 APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }}
191 CSC_LINK: ${{ secrets.CSC_LINK }}
192 CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
193 WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
194 WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
195 - name: Build Ferdi with publish for 'release' branch
196 if: ${{ env.GIT_BRANCH_NAME == 'release' }}
197 run: npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=ferdi
198 shell: bash
199 env:
200 GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }}
201 APPLEID: ${{ secrets.APPLEID }}
202 APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }}
203 CSC_LINK: ${{ secrets.CSC_LINK }}
204 CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
205 WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
206 WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 554dbddff..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,100 +0,0 @@
1matrix:
2 fast_finish: true
3 include:
4 - os: linux
5 dist: xenial
6 addons:
7 apt:
8 packages:
9 - libx11-dev
10 - libxext-dev
11 - libxss-dev
12 - libxkbfile-dev
13 - rpm
14 env:
15 - USE_HARD_LINKS=false
16 - ELECTRON_CACHE=$HOME/.cache/electron
17 - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
18 - os: osx
19 osx_image: xcode12.4
20 env:
21 - USE_HARD_LINKS=false
22 - ELECTRON_CACHE=$HOME/.cache/electron
23 - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
24
25language: node_js
26node_js: "14.16.1"
27
28git:
29 submodules: false
30branches:
31 only:
32 - develop
33 - release
34 - nightly
35cache:
36 directories:
37 - node_modules
38 - $HOME/.cache/electron
39 - $HOME/.cache/electron-builder
40
41before_install:
42 - git submodule update --init --recursive
43 - |
44 if [ $TRAVIS_BRANCH == "nightly" ]; then
45 git remote add source https://${GH_TOKEN}@github.com/getferdi/ferdi.git > /dev/null 2>&1
46 git fetch source
47 git merge --no-ff --commit -m "Merge remote-tracking branch 'source/develop' into HEAD [skip ci]" source/develop
48 CHANGES_COUNT=$(git diff --shortstat HEAD origin/$TRAVIS_BRANCH | wc -l)
49 echo "Travis event type: $TRAVIS_EVENT_TYPE"
50 echo "Number of changes: $CHANGES_COUNT"
51 if [ $CHANGES_COUNT -eq 0 -a $TRAVIS_EVENT_TYPE == "cron" ]; then
52 export SHOULD_CONTINUE_BUILD="false"
53 echo "Exporting SHOULD_CONTINUE_BUILD to false for future stages"
54 else
55 echo "Found changes, proceeding with submodule updates"
56 git submodule update --remote --force
57 git commit -am "Update submodules [skip ci]" --no-verify
58 echo "Completed merging from develop branch and upgrading submodules"
59 fi
60 fi
61install:
62 - |
63 if [ "$SHOULD_CONTINUE_BUILD" == "false" ]; then
64 echo "Skipping install stage since SHOULD_CONTINUE_BUILD: $SHOULD_CONTINUE_BUILD"
65 else
66 travis_retry npm cache clean -f || travis_terminate 1
67 travis_retry npm uninstall node-gyp || travis_terminate 1
68 travis_retry npm i -g node-gyp@8.0.0 || travis_terminate 1
69 cd recipes && npm i && npm run package && cd .. || travis_terminate 1
70 travis_retry npx lerna bootstrap || travis_terminate 1
71 fi
72before_script:
73 - |
74 if [ "$SHOULD_CONTINUE_BUILD" == "false" ]; then
75 echo "Skipping before_script stage since SHOULD_CONTINUE_BUILD: $SHOULD_CONTINUE_BUILD"
76 else
77 npm run lint && npm run test || travis_terminate 1
78 fi
79script:
80 - |
81 if [ "$SHOULD_CONTINUE_BUILD" == "false" ]; then
82 echo "Terminating the build since there are no changes in a cron-triggered build"
83 travis_terminate 0
84 exit 0 # Note: Bug fix since 'travis_terminate' doesn't seem to exit immediately
85 else
86 echo "Building for branch: $TRAVIS_BRANCH"
87 if [ $TRAVIS_BRANCH == "release" ]; then
88 travis_retry travis_wait 100 npm run build -- --publish always -c.publish.provider=github -c.publish.owner=getferdi -c.publish.repo=ferdi || travis_terminate 1
89 elif [ $TRAVIS_BRANCH == "nightly" ]; then
90 git commit -am "Apply linter fixes [skip ci]" --no-verify
91 npm version prerelease --preid=nightly -m "%s and trigger AppVeyor nightly build [skip travisci]" || travis_terminate 1
92 if [ $TRAVIS_OS_NAME == "osx" ]; then
93 git remote add source https://${GH_TOKEN}@github.com/getferdi/ferdi.git > /dev/null 2>&1
94 git push -qu source HEAD:$TRAVIS_BRANCH --no-verify >/dev/null 2>&1
95 fi
96 travis_retry travis_wait 100 npm run build -- --publish always -c.publish.provider=github -c.publish.owner=getferdi -c.publish.repo=nightlies || travis_terminate 1
97 elif [ "$TRAVIS_PULL_REQUEST_BRANCH" != "i18n" ]; then
98 travis_retry travis_wait 100 npm run build || travis_terminate 1
99 fi
100 fi
diff --git a/Dockerfile b/Dockerfile
index 4f772c0da..c94b42539 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,13 +8,14 @@ COPY lerna.json ./
8# Note: This is being set to bypass the error with missing git repo information for the 'preval-build-info' module 8# Note: This is being set to bypass the error with missing git repo information for the 'preval-build-info' module
9ENV PREVAL_BUILD_INFO_PLACEHOLDERS=true 9ENV PREVAL_BUILD_INFO_PLACEHOLDERS=true
10 10
11RUN npm i node-gyp@8.0.0 \ 11RUN npm i -g node-gyp@8.0.0 \
12 && npm config set node_gyp "$(which node-gyp)" \
12 && npx lerna bootstrap 13 && npx lerna bootstrap
13 14
14COPY . . 15COPY . .
15 16
16RUN cd recipes && npm i && npm run package && cd .. \ 17RUN cd recipes && npm i && npm run package && cd ..
17 && npm run build 18RUN npm run build
18 19
19FROM busybox 20FROM busybox
20 21
diff --git a/README.md b/README.md
index 87f2b1947..e937a7c36 100644
--- a/README.md
+++ b/README.md
@@ -18,8 +18,7 @@
18<!-- ALL-CONTRIBUTORS-BADGE:END --> 18<!-- ALL-CONTRIBUTORS-BADGE:END -->
19<a href="#backers-via-opencollective"><img alt="Open Collective backers" src="https://img.shields.io/opencollective/backers/getferdi?logo=open-collective"></a> 19<a href="#backers-via-opencollective"><img alt="Open Collective backers" src="https://img.shields.io/opencollective/backers/getferdi?logo=open-collective"></a>
20<a href="#sponsors-via-opencollective"><img alt="Open Collective sponsors" src="https://img.shields.io/opencollective/sponsors/getferdi?logo=open-collective"></a> 20<a href="#sponsors-via-opencollective"><img alt="Open Collective sponsors" src="https://img.shields.io/opencollective/sponsors/getferdi?logo=open-collective"></a>
21<a href="https://ci.appveyor.com/project/kytwb/ferdi"><img alt="Build Status Windows" src="https://img.shields.io/appveyor/ci/kytwb/ferdi/master?logo=appveyor"></a> 21<a href="https://github.com/getferdi/ferdi/actions/workflows/ferdi-builds.yml"><img alt="Build Status" src="https://github.com/getferdi/ferdi/actions/workflows/ferdi-builds.yml/badge.svg?branch=develop&event=push"></a>
22<a href="https://travis-ci.org/getferdi/ferdi"><img alt="Build Status Mac & Linux" src="https://img.shields.io/travis/getferdi/ferdi/master?logo=travis"></a>
23<a href="https://gitter.im/getferdi/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img alt="Gitter Chat Room" src="https://img.shields.io/gitter/room/getferdi/community"></a> 22<a href="https://gitter.im/getferdi/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img alt="Gitter Chat Room" src="https://img.shields.io/gitter/room/getferdi/community"></a>
24</p> 23</p>
25 24
@@ -38,6 +37,7 @@
38 - [How to get and start using Ferdi](#how-to-get-and-start-using-ferdi) 37 - [How to get and start using Ferdi](#how-to-get-and-start-using-ferdi)
39 - [Download Ferdi](#download-ferdi) 38 - [Download Ferdi](#download-ferdi)
40 - [Or use Chocolatey (Windows only)](#or-use-chocolatey-windows-only) 39 - [Or use Chocolatey (Windows only)](#or-use-chocolatey-windows-only)
40 - [Or use Windows Package Manager (Windows only)](#or-use-windows-package-manager-windows-only)
41 - [Or use homebrew (macOS or Linux)](#or-use-homebrew-macos-or-linux) 41 - [Or use homebrew (macOS or Linux)](#or-use-homebrew-macos-or-linux)
42 - [Or use AUR (Arch Linux)](#or-use-aur-arch-linux) 42 - [Or use AUR (Arch Linux)](#or-use-aur-arch-linux)
43 - [What makes Ferdi different from Franz?](#what-makes-ferdi-different-from-franz) 43 - [What makes Ferdi different from Franz?](#what-makes-ferdi-different-from-franz)
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 7fd061523..000000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,58 +0,0 @@
1version: build-{build}
2branches:
3 only:
4 - develop
5 - nightly
6 - release
7skip_tags: true
8skip_branch_with_pr: true
9
10cache:
11 - '%APPDATA%\npm-cache'
12 - node_modules
13 - '%USERPROFILE%\.electron'
14 - '%USERPROFILE%\.electron-builder'
15
16image: Visual Studio 2019
17
18environment:
19 nodejs_version: "14.16.1"
20
21install:
22 - appveyor-retry git submodule update --init --recursive
23 - ps: Update-NodeJsInstallation $env:nodejs_version
24 - cmd: set NODE_OPTIONS=--max-old-space-size=2048
25 - cd recipes && npm i && npm run package && cd ..
26 - appveyor-retry npx lerna bootstrap
27
28before_build:
29 - npm run lint && npm test
30 - cmd: set NODE_ENV=production
31
32build_script:
33 - appveyor-retry npm run build
34
35for:
36-
37 branches:
38 only:
39 - develop
40 build_script:
41 - appveyor-retry npm run build
42 skip_commits:
43 files:
44 - src/i18n/**/*.json
45-
46 branches:
47 only:
48 - nightly
49 only_commits:
50 message: /trigger AppVeyor nightly build/
51 build_script:
52 - appveyor-retry npm run build -- --publish always -c.publish.provider=github -c.publish.owner=getferdi -c.publish.repo=nightlies
53-
54 branches:
55 only:
56 - release
57 build_script:
58 - appveyor-retry npm run build -- --publish always -c.publish.provider=github -c.publish.owner=getferdi -c.publish.repo=ferdi
diff --git a/build-helpers/notarize.js b/build-helpers/notarize.js
index cb83808ad..d5a6027fb 100644
--- a/build-helpers/notarize.js
+++ b/build-helpers/notarize.js
@@ -2,7 +2,7 @@ const { notarize } = require("electron-notarize");
2 2
3exports.default = async function notarizing(context) { 3exports.default = async function notarizing(context) {
4 const { electronPlatformName, appOutDir } = context; 4 const { electronPlatformName, appOutDir } = context;
5 if (electronPlatformName !== "darwin" || (process.env.TRAVIS_BRANCH !== 'release' && process.env.TRAVIS_BRANCH !== 'nightly')) { 5 if (electronPlatformName !== "darwin" || (process.env.GIT_BRANCH_NAME !== 'release' && process.env.GIT_BRANCH_NAME !== 'nightly')) {
6 return; 6 return;
7 } 7 }
8 8
diff --git a/recipes b/recipes
Subproject e05d27ea49929e763906e6c430ec79c1a093dde Subproject 19a224623d8b4b2302994ccab050b463d0ee817