Added travis.yml

This commit is contained in:
Kylart 2019-06-14 13:28:07 +02:00
parent 020c792205
commit 3b16c0466c
3 changed files with 49 additions and 1 deletions

44
.travis.yml Normal file
View File

@ -0,0 +1,44 @@
matrix:
include:
- os: osx
osx_image: xcode9.4
language: node_js
node_js: "10"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
services: docker
language: generic
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
install:
- npm ci
jobs:
include:
-
name: Lint
script:
- npm run lint
-
name: Deploy
if: branch = master
script:
- |
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 \
/bin/bash -c "npm run publish:linux"
else
npm run publish:mac
fi

View File

@ -3,6 +3,7 @@
"version": "0.4.0",
"main": "background.js",
"repository": "https://github.com/Kylart/KawAnime.git",
"description": "The ultimate otaku software",
"author": {
"name": "Kylart",
"email": "Kylart.dev@gmail.com"
@ -16,6 +17,9 @@
"dist:mac": "npm run build -- --mac",
"dist:win": "npm run build -- --win --x64 --ia32",
"dist:linux": "npm run build -- --linux deb AppImage",
"publish:mac": "npm run build -- --mac -p always",
"publish:win": "npm run build -- --linux deb AppImage -p always",
"publish:linux": "npm run build -- --mac -p always",
"lint": "vue-cli-service lint",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps",

View File

@ -23,7 +23,7 @@ module.exports = {
pluginOptions: {
electronBuilder: {
builderOptions: {
appId: 'KawAnime',
appId: 'com.kylart.kawanime',
productName: 'KawAnime',
dmg: {
contents: [