This repository has been archived by the owner on May 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ridaamirini/dev
Dev
- Loading branch information
Showing
17 changed files
with
8,644 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ npm-debug.log | |
npm-debug.log.* | ||
thumbs.db | ||
!.gitkeep | ||
auth.json | ||
.idea/* |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,51 @@ | ||
osx_image: xcode8.3 | ||
sudo: required | ||
dist: trusty | ||
language: c | ||
matrix: | ||
include: | ||
- os: osx | ||
- os: linux | ||
env: CC=clang CXX=clang++ npm_config_clang=1 | ||
compiler: clang | ||
- os: osx | ||
osx_image: xcode9.2 | ||
language: node_js | ||
node_js: "9" | ||
env: | ||
- ELECTRON_CACHE=$HOME/.cache/electron | ||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder | ||
|
||
- os: linux | ||
services: docker | ||
language: generic | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
- "$HOME/.electron" | ||
- "$HOME/.cache" | ||
addons: | ||
apt: | ||
packages: | ||
- libgnome-keyring-dev | ||
- icnsutils | ||
- $HOME/.cache/electron | ||
- $HOME/.cache/electron-builder | ||
|
||
before_install: | ||
- mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([ | ||
"$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz | ||
| tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi | ||
install: | ||
- nvm install 7 | ||
- curl -o- -L https://yarnpkg.com/install.sh | bash | ||
- source ~/.bashrc | ||
- npm install -g xvfb-maybe | ||
- yarn | ||
- openssl aes-256-cbc -K $encrypted_720ad0b35daf_key -iv $encrypted_720ad0b35daf_iv -in auth.json.enc -out auth.json -d | ||
- | | ||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.3.1/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.3.1.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1 | ||
export PATH="/tmp/git-lfs:$PATH" | ||
fi | ||
before_script: | ||
- git lfs pull | ||
|
||
script: | ||
- yarn run build | ||
- | | ||
if [ "$TRAVIS_OS_NAME" == "linux" ]; then | ||
docker run --rm \ | ||
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \ | ||
-v ${PWD}:/project \ | ||
-v ~/.cache/electron:/root/.cache/electron \ | ||
-v ~/.cache/electron-builder:/root/.cache/electron-builder \ | ||
electronuserland/builder:wine \ | ||
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn release --linux --win" | ||
else | ||
yarn release | ||
fi | ||
before_cache: | ||
- rm -rf $HOME/.cache/electron-builder/wine | ||
|
||
branches: | ||
except: | ||
- "/^v\\d+\\.\\d+\\.\\d+$/" | ||
only: | ||
- master | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"rev": "c4d8eaa", | ||
"version": "0.0.1.c4d8eaa", | ||
"date": "2018-3-25 18:31:23" | ||
"rev": "796bdcf", | ||
"version": "0.0.2.796bdcf", | ||
"date": "2018-3-26 00:58:08" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { autoUpdater } from 'electron-updater'; | ||
import log from 'electron-log'; | ||
import { app, ipcMain } from 'electron'; | ||
|
||
app.once('browser-window-focus', (event, win) => { | ||
let __updateWin; | ||
|
||
// Set logger | ||
autoUpdater.logger = log; | ||
autoUpdater.logger.transports.file.level = 'info'; | ||
|
||
// Configure updater | ||
autoUpdater.allowPrerelease = false; | ||
autoUpdater.autoDownload = false; | ||
|
||
autoUpdater.on('update-available', ({version, releaseNotes}) => { | ||
if (__updateWin) { | ||
return; | ||
} | ||
|
||
win.webContents.send('update-available', { | ||
version, | ||
releaseNotes, | ||
currentVersion: app.getVersion() | ||
}); | ||
|
||
__updateWin = win; | ||
|
||
__updateWin.on('close', () => { | ||
__updateWin = null; | ||
}); | ||
}); | ||
|
||
autoUpdater.on('update-not-available', () => { | ||
if (__updateWin) return; | ||
|
||
win.webContents.send('update-not-available'); | ||
}); | ||
|
||
autoUpdater.on('update-downloaded', () => { | ||
autoUpdater.quitAndInstall(); | ||
}); | ||
|
||
autoUpdater.on('download-progress', progress => { | ||
if (__updateWin) { | ||
__updateWin.webContents.send('download-progress', progress); | ||
} | ||
}); | ||
|
||
autoUpdater.on('error', error => { | ||
if (__updateWin) { | ||
__updateWin.webContents.send('update-error', error); | ||
} | ||
}); | ||
|
||
ipcMain.on('download-update', () => { | ||
if (process.env.NODE_ENV === 'production') autoUpdater.downloadUpdate(); | ||
}); | ||
|
||
ipcMain.on('check-update-manually', () => { | ||
if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates(); | ||
}); | ||
}); | ||
|
||
export function checkForUpdates () { | ||
if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.