From 23540cd1803ac875030a0687332f960c698e472a Mon Sep 17 00:00:00 2001 From: Ilya Kogan Date: Sat, 11 Jun 2016 18:59:40 -0400 Subject: [PATCH 1/2] Working Travis build. --- .travis.yml | 44 +++++++++------------------------ .travis/build.sh | 13 ++++++++++ .travis/install-dependencies.sh | 16 ++++++++++++ 3 files changed, 40 insertions(+), 33 deletions(-) create mode 100755 .travis/build.sh create mode 100755 .travis/install-dependencies.sh diff --git a/.travis.yml b/.travis.yml index e48e21e..fc484f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,13 @@ -osx_image: xcode7.3 - sudo: required dist: trusty -language: c +language: node_js +node_js: + - "6" -matrix: - include: - - os: osx - - os: linux - env: CC=clang CXX=clang++ npm_config_clang=1 - - os: win - - arch: x86 - - arch: x64 +os: + - osx + - linux cache: directories: @@ -20,33 +15,16 @@ cache: - app/node_modules - $HOME/.electron -addons: - apt: - sources: - - ubuntu-toolchain-r-test - - ubuntu-wine - - llvm-toolchain-precise-3.8 - packages: - - wine1.8 - - icnsutils - - graphicsmagick - - xz-utils - - rpm - - mono-devel - - ca-certificates-mono - - gcc-multilib - - g++-multilib - - clang-3.8 +before_install: + - .travis/install-dependencies.sh install: -- nvm install 6 -- npm install electron-builder - npm install - npm prune script: -- npm run dist + - .travis/build.sh branches: - except: - - "/^v\\d+\\.\\d+\\.\\d+$/" + only: + - travis diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100755 index 0000000..2320801 --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +echo "Building on ${TRAVIS_OS_NAME}..." + +if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + npm run dist:win64 + npm run dist:win32 + npm run dist:linux64 + npm run dist:linux32 +elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then + npm run dist:darwin +fi diff --git a/.travis/install-dependencies.sh b/.travis/install-dependencies.sh new file mode 100755 index 0000000..10031d9 --- /dev/null +++ b/.travis/install-dependencies.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +echo "Installing dependenceis for ${TRAVIS_OS_NAME}..." + +if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + sudo apt-add-repository ppa:ubuntu-wine/ppa -y + sudo apt-add-repository ppa:likemartinma/osslsigncode -y + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF + + echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list + + sudo dpkg --add-architecture i386 + sudo apt-get update || true + sudo apt-get install build-essential icnsutils graphicsmagick xz-utils rpm wine1.8 mono-devel ca-certificates-mono osslsigncode gcc-multilib g++-multilib -y --no-install-recommends +fi From 96d3cee152c010360b072629d072e04ef45c2733 Mon Sep 17 00:00:00 2001 From: Ilya Kogan Date: Sat, 11 Jun 2016 20:16:42 -0400 Subject: [PATCH 2/2] Adding deployment. --- .travis.yml | 31 +++++++++++++++++++------------ .travis/build.sh | 11 +++++++++++ 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc484f0..e5ec4e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,28 +3,35 @@ dist: trusty language: node_js node_js: - - "6" +- '6' os: - - osx - - linux +- osx +- linux cache: - directories: - - node_modules - - app/node_modules - - $HOME/.electron + directories: + - node_modules + - app/node_modules + - "$HOME/.electron" before_install: - - .travis/install-dependencies.sh +- ".travis/install-dependencies.sh" install: - npm install - npm prune script: - - .travis/build.sh +- ".travis/build.sh" -branches: - only: - - travis +deploy: + provider: releases + api_key: + secure: vRjTudDpfxtoT3MzxRnITwBu3dLiDp7/xp4tw52A9oAX22T4C9+7xn17tJxfYBLk0rjhjgixCw0yhfe9dwI5AteGA9PUxjN7F2E2JVpNzj5umBVuZSFGFsmmJa/3ZWjlV8lItJ0ZLirLFRj3Cpd0Vwl3J6y/rTINB/C9P5fU14sTfQI8eaZz8eZqG4cmaKu2YdkLsYdcduQPrfj91ag3u0ggCiyd+k3ZAdEpC9nOQjWRBr6EaMVJ0+X6e9o940n0HL336Yw7dZ7+iXwcF2uLWnS8Ye8Uy3sMFL0jEzdwK0sU2pyMqNvrejhMDOSofMV/sP4+UTX2KAeh36ghGMFRlF2pwdMAMD1zjD7G+0RwZrkjZiDTQ2MyabK2Gs+W2gWcIdsEecAscK/19OF6iEc4vSaCzk1pAyCivJrPVOeStMC0z4bxmtJMbIRP9mGkCshf5ajldrNkMtT1EV3v3p+WSaAXb76iEj3Vc+pt3rXf4lIf3qjlCdit/VBATNZzwuYj4FTDbQ7x7t4j6xCHIyukWmNLTOReSEnktW2BK5z7i/G+4vSq39veORpG7k12f2eV6verd2H0RmUbKdsBNjAUbiMx8RxnUKFFXld1JmJAqHqf6YC7H+YdFttTV/BILc6SUvxqND74zFk0+tD+tLfmr9SEfTtEyxNSncI1j1rqGjU= + file_glob: true + file: "dist/release/*" + skip_cleanup: true + on: + repo: ikogan/farnsworth + tags: true diff --git a/.travis/build.sh b/.travis/build.sh index 2320801..1938fd4 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -3,11 +3,22 @@ set -e echo "Building on ${TRAVIS_OS_NAME}..." +mkdir -p dist/release + if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then npm run dist:win64 + mv -v dist/win/*.exe dist/release npm run dist:win32 + mv -v dist/win-ia32/*.exe dist/release npm run dist:linux64 npm run dist:linux32 + mv -v dist/*.rpm dist/release + mv -v dist/*.deb dist/release + mv -v dist/*.tar.gz dist/release elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then npm run dist:darwin + mv -v dist/osx/*.dmg dist/release +else + echo "Unhandled operating ${TRAVIS_OS_NAME}!" + exit 1 fi