Commit 1d97f425 authored by Jeremy Bokobza's avatar Jeremy Bokobza

Merge branch 'master' of https://github.com/stratisproject/Breeze

parents bccab88b fa4f52cc
...@@ -7,10 +7,8 @@ matrix: ...@@ -7,10 +7,8 @@ matrix:
dist: trusty dist: trusty
sudo: required sudo: required
dotnet: 2.0.0 dotnet: 2.0.0
env: os_identifier=ubuntu.14.04
- os: osx # OSX 10.12 - os: osx # OSX 10.12
osx_image: xcode9 osx_image: xcode9
env: os_identifier=osx.10.12
before_install: before_install:
- brew update - brew update
- curl https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh - curl https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
...@@ -31,6 +29,15 @@ env: ...@@ -31,6 +29,15 @@ env:
- arch=x64 - arch=x64
- configuration=Release - configuration=Release
- os_platform=linux - os_platform=linux
- CSC_IDENTITY_AUTO_DISCOVERY=false
cache:
directories:
- ${TRAVIS_BUILD_DIR}/Breeze.UI/node_modules
- $HOME/.electron
- $HOME/.nuget/packages
- /usr/share/dotnet/sdk/ # dotnet path for linux
- /Users/travis/.dotnet/sdk/ # dotnet path for mac
# Work around NuGet issue #2163 # Work around NuGet issue #2163
# https://github.com/NuGet/Home/issues/2163 # https://github.com/NuGet/Home/issues/2163
...@@ -51,7 +58,10 @@ deploy: ...@@ -51,7 +58,10 @@ deploy:
api_key: api_key:
secure: $secure_github_key # this key is set on the Travis build page secure: $secure_github_key # this key is set on the Travis build page
file_glob: true file_glob: true
file: "$TRAVIS_BUILD_DIR/deploy/*.zip" file:
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.deb"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.tar.gz"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.dmg"
skip_cleanup: true skip_cleanup: true
overwrite: true overwrite: true
prerelease: true prerelease: true
......
{ {
"appId": "com.stratisplatform.breeze", "appId": "com.stratisplatform.breeze",
"productName": "Breeze Wallet", "productName": "Breeze Wallet",
"mac": { "publish": null,
"category": "com.stratisplatform.breeze"
},
"directories": { "directories": {
"app": "dist", "app": "dist",
"output": "app-builds" "output": "app-builds",
"buildResources": "dist/assets/images"
}, },
"win": { "win": {
"icon": "dist/assets/images/breeze-logo", "icon": "dist/assets/images/icon",
"target": ["nsis"] "target": [
"nsis"
],
"artifactName": "${productName}-v${version}-setup-${os}-${env.arch}.${ext}"
},
"linux": {
"target": [
"deb",
"tar.gz"
],
"synopsis": "Breeze Wallet: Stratis' dual-currency full block light wallet with a strong focus on privacy.",
"category": "Utility",
"icon": "dist/assets/images/icons",
"artifactName": "${productName}-v${version}-${os}-${arch}.${ext}"
},
"mac": {
"target": [
"dmg"
],
"category": "public.app-category.productivity",
"artifactName": "${productName}-v${version}-${os}-${arch}.${ext}"
}, },
"nsis": { "nsis": {
"oneClick": false, "oneClick": false,
...@@ -18,13 +37,13 @@ ...@@ -18,13 +37,13 @@
"allowToChangeInstallationDirectory": true, "allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": true, "deleteAppDataOnUninstall": true,
"guid": "ed20df62-ff5a-4b83-a5e3-a361357c6e51", "guid": "ed20df62-ff5a-4b83-a5e3-a361357c6e51",
"createDesktopShortcut": false, "createDesktopShortcut": true,
"createStartMenuShortcut": true, "createStartMenuShortcut": true
"artifactName": "${productName}.v${version}.setup.${env.win_runtime}.${ext}"
}, },
"msi": { "msi": {
"warningsAsErrors": false "warningsAsErrors": false
}, },
"extraResources": ["daemon/**/*"] "extraResources": [
"daemon/**/*"
]
} }
const electron = require('electron'); const electron = require('electron');
// Module to control application life. // Module to control application life.
const app = electron.app; const app = electron.app;
...@@ -158,12 +158,11 @@ function startBitcoinApi() { ...@@ -158,12 +158,11 @@ function startBitcoinApi() {
let apiPath = path.resolve(__dirname, 'assets//daemon//Stratis.BreezeD'); let apiPath = path.resolve(__dirname, 'assets//daemon//Stratis.BreezeD');
if (os.platform() === 'win32') { if (os.platform() === 'win32') {
apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe'); apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe');
} else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} else {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} }
// else if(os.platform() === 'darwin') {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD.exe');
// } else {
// apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD.exe');
// }
if(!testnet) { if(!testnet) {
...@@ -190,12 +189,11 @@ function startStratisApi() { ...@@ -190,12 +189,11 @@ function startStratisApi() {
let apiPath = path.resolve(__dirname, 'assets//daemon//Stratis.BreezeD'); let apiPath = path.resolve(__dirname, 'assets//daemon//Stratis.BreezeD');
if (os.platform() === 'win32') { if (os.platform() === 'win32') {
apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe'); apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe');
} else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} else {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} }
// else if(os.platform() === 'darwin') {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD.exe');
// } else {
// apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD.exe');
// }
if (!testnet) { if (!testnet) {
stratisProcess = spawnStratis(apiPath, ['stratis'], { stratisProcess = spawnStratis(apiPath, ['stratis'], {
......
{ {
"name": "Breeze", "name": "BreezeWallet",
"description": "Graphical User Interface for Breeze Wallet.", "description": "Breeze Wallet: Stratis' dual-currency full block light wallet with a strong focus on privacy.",
"version": "0.3.0", "version": "0.3.0",
"author": { "author": {
"name": "Stratis Group", "name": "Stratis Group",
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"breeze", "breeze",
"ui", "ui",
"stratis", "stratis",
"bitcoin",
"angular", "angular",
"electron", "electron",
"typescript", "typescript",
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# Breeze # Breeze
__Warning: This is an experimental build. At the moment, only bitcoin on testnet is supported but more is coming soon. Use at your own risk.__ __Warning: We're still in beta, so use at your own risk.__
This is the repository of the Breeze Wallet, the first full-block SPV bitcoin wallet using Angular and Electron at the front-end and C# with .NET Core in the back-end. This is the repository of the Breeze Wallet, the first full-block SPV bitcoin wallet using Angular and Electron at the front-end and C# with .NET Core in the back-end.
## Daemon Build ## Daemon Build
...@@ -43,7 +43,7 @@ dotnet run stratis -testnet ...@@ -43,7 +43,7 @@ dotnet run stratis -testnet
## CI Build ## CI Build
----------- -----------
We use [AppVeyor](https://www.appveyor.com/) for Windows CI builds and [Travis CI](https://travis-ci.org/) (coming soon) for our Linux and MacOS ones. We use [AppVeyor](https://www.appveyor.com/) for Windows CI builds and [Travis CI](https://travis-ci.org/) for our Linux and MacOS ones.
Every time someone pushes to the master branch or create a pull request on it, a build is triggered and a new unstable app release is created. Every time someone pushes to the master branch or create a pull request on it, a build is triggered and a new unstable app release is created.
To skip a build, for example if you've made very minor changes, include the text **[skip ci]** or **[ci skip]** in your commits' comment (with the squared brackets). To skip a build, for example if you've made very minor changes, include the text **[skip ci]** or **[ci skip]** in your commits' comment (with the squared brackets).
...@@ -52,17 +52,14 @@ If you want the :sparkles: latest :sparkles: (unstable :bomb:) version of the Br ...@@ -52,17 +52,14 @@ If you want the :sparkles: latest :sparkles: (unstable :bomb:) version of the Br
| | x86 Release | x64 Release | Notes | | | x86 Release | x64 Release | Notes |
|:---|----------------:|------------------:|------------------:| |:---|----------------:|------------------:|------------------:|
|**Windows 7**| [download][7] | [download][8] | continuous build - up to date with commits | |**Windows**| [download][7] | [download][8] | Windows 7 and Windows 10 |
|**Windows 10**| [download][9] | [download][10] | continuous build - up to date with commits | |**Linux**| - | [download][9] | All Linux flavors |
|**Ubuntu 14.04**| - | [download][11] | continuous build - up to date with commits | |**OS X**| - | [download][10] | OSX 10.12 or later |
|**OS X 10.12**| - | [download][12] | continuous build - up to date with commits |
[7]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze.Wallet-v0.3.0-setup-win-ia32.exe
[7]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-win7-x86-Release.zip [8]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze.Wallet-v0.3.0-setup-win-x64.exe
[8]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-win7-x64-Release.zip [9]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze.Wallet-v0.3.0-linux-x64.tar.gz
[9]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-win10-x86-Release.zip [10]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze.Wallet-v0.3.0-mac.dmg
[10]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-win10-x64-Release.zip
[11]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-ubuntu.14.04-x64-Release.zip
[12]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-osx.10.12-x64-Release.zip
...@@ -20,7 +20,6 @@ branches: ...@@ -20,7 +20,6 @@ branches:
image: Visual Studio 2017 image: Visual Studio 2017
clone_folder: c:\projects\breeze clone_folder: c:\projects\breeze
configuration: configuration:
# - Debug
- Release - Release
build: build:
...@@ -28,25 +27,21 @@ build: ...@@ -28,25 +27,21 @@ build:
environment: environment:
matrix: matrix:
- win_runtime: win7-x64 - win_runtime: win-x64
arch: x64 arch: x64
plat: win32 plat: win32
- win_runtime: win7-x86 - win_runtime: win-x86
arch: ia32
plat: win32
- win_runtime: win10-x64
arch: x64
plat: win32
- win_runtime: win10-x86
arch: ia32 arch: ia32
plat: win32 plat: win32
# build cache to preserve files/folders between builds
cache:
- '%APPVEYOR_BUILD_FOLDER%\Breeze.UI\node_modules'
- '%USERPROFILE%\.nuget\packages'
init: init:
- ps: | - ps: |
$env:log_prefix = "[$env:win_runtime][$env:configuration]" $env:log_prefix = "[$env:win_runtime][$env:configuration]"
$env:node_output_name = "Breeze-$env:plat-$env:arch"
$env:app_output_name = "breeze-$env:win_runtime"
$env:app_output_zip_name = "breeze-$env:win_runtime-$env:configuration.zip"
if ($env:APPVEYOR_REPO_TAG -eq "false") { $env:APPVEYOR_REPO_TAG_NAME = "cd-unstable" } if ($env:APPVEYOR_REPO_TAG -eq "false") { $env:APPVEYOR_REPO_TAG_NAME = "cd-unstable" }
install: install:
...@@ -82,9 +77,6 @@ before_build: ...@@ -82,9 +77,6 @@ before_build:
Write-Host "Windows runtime: $env:win_runtime" -foregroundcolor "magenta" Write-Host "Windows runtime: $env:win_runtime" -foregroundcolor "magenta"
Write-Host "Build directory: $env:APPVEYOR_BUILD_FOLDER" -foregroundcolor "magenta" Write-Host "Build directory: $env:APPVEYOR_BUILD_FOLDER" -foregroundcolor "magenta"
Write-Host "Configuration: $env:configuration" -foregroundcolor "magenta" Write-Host "Configuration: $env:configuration" -foregroundcolor "magenta"
Write-Host "node.js output name: $env:node_output_name" -foregroundcolor "magenta"
Write-Host "App output folder name: $env:app_output_name" -foregroundcolor "magenta"
Write-Host "App output zip file name: $env:app_output_zip_name" -foregroundcolor "magenta"
Write-Host "Branch: $env:APPVEYOR_REPO_BRANCH" -foregroundcolor "magenta" Write-Host "Branch: $env:APPVEYOR_REPO_BRANCH" -foregroundcolor "magenta"
Write-Host "Tag is set: $env:APPVEYOR_REPO_TAG" -foregroundcolor "magenta" Write-Host "Tag is set: $env:APPVEYOR_REPO_TAG" -foregroundcolor "magenta"
Write-Host "Tag: $env:APPVEYOR_REPO_TAG_NAME" -foregroundcolor "magenta" Write-Host "Tag: $env:APPVEYOR_REPO_TAG_NAME" -foregroundcolor "magenta"
......
...@@ -5,8 +5,8 @@ set -o errexit ...@@ -5,8 +5,8 @@ set -o errexit
# define a few variables # define a few variables
node_output_name="Breeze-$os_platform-$arch" node_output_name="Breeze-$os_platform-$arch"
app_output_name="breeze-$os_identifier-$arch" app_output_name="breeze-$TRAVIS_OS_NAME-$arch"
app_output_zip_name="breeze-$os_identifier-$arch-$configuration.zip" app_output_zip_name="breeze-$TRAVIS_OS_NAME-$arch.zip"
if [ "$TRAVIS_OS_NAME" = "osx" ] if [ "$TRAVIS_OS_NAME" = "osx" ]
then then
...@@ -17,7 +17,6 @@ fi ...@@ -17,7 +17,6 @@ fi
echo "current environment variables:" echo "current environment variables:"
echo "OS name:" $TRAVIS_OS_NAME echo "OS name:" $TRAVIS_OS_NAME
echo "OS identifier:" $os_identifier
echo "Platform:" $os_platform echo "Platform:" $os_platform
echo "Build directory:" $TRAVIS_BUILD_DIR echo "Build directory:" $TRAVIS_BUILD_DIR
echo "Node version:" $TRAVIS_NODE_VERSION echo "Node version:" $TRAVIS_NODE_VERSION
...@@ -43,15 +42,16 @@ git submodule update --init --recursive ...@@ -43,15 +42,16 @@ git submodule update --init --recursive
cd $TRAVIS_BUILD_DIR/Breeze.UI cd $TRAVIS_BUILD_DIR/Breeze.UI
npm install npm install
npm install -g npx
echo $log_prefix FINISHED restoring dotnet and npm packages echo $log_prefix FINISHED restoring dotnet and npm packages
# dotnet publish # dotnet publish
echo $log_prefix running 'dotnet publish' echo $log_prefix running 'dotnet publish'
cd $TRAVIS_BUILD_DIR/StratisBitcoinFullNode/Stratis.BreezeD cd $TRAVIS_BUILD_DIR/StratisBitcoinFullNode/Stratis.BreezeD
dotnet publish -c $configuration -r $os_identifier-$arch -v m -o $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME dotnet publish -c $configuration -r $TRAVIS_OS_NAME-$arch -v m -o $TRAVIS_BUILD_DIR/Breeze.UI/daemon
echo $log_prefix chmoding the Stratis.BreezeD file echo $log_prefix chmoding the Stratis.BreezeD file
chmod +x $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/Stratis.BreezeD chmod +x $TRAVIS_BUILD_DIR/Breeze.UI/daemon/Stratis.BreezeD
# node Build # node Build
cd $TRAVIS_BUILD_DIR/Breeze.UI cd $TRAVIS_BUILD_DIR/Breeze.UI
...@@ -60,25 +60,25 @@ npm run build:prod ...@@ -60,25 +60,25 @@ npm run build:prod
# node packaging # node packaging
echo $log_prefix packaging breeze echo $log_prefix packaging breeze
node package.js --platform=$os_platform --arch=$arch --path=$TRAVIS_BUILD_DIR/breeze_out if [ "$TRAVIS_OS_NAME" = "osx" ]
then
# rename node generated folder npx electron-builder build --mac --$arch
echo $log_prefix rename the folder generated by npm from $node_output_name to $app_output_name else
mv $TRAVIS_BUILD_DIR/breeze_out/$node_output_name $TRAVIS_BUILD_DIR/breeze_out/$app_output_name npx electron-builder build --linux --$arch
fi
# copy api libs into app
echo $log_prefix copying the Breeze api into the app
mkdir -p $dotnet_resources_path_in_app
cp -r $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/* $dotnet_resources_path_in_app
# zip result echo $log_prefix finished packaging
echo $log_prefix zipping the app into $TRAVIS_BUILD_DIR/breeze_out/$app_output_zip_name
mkdir -p $TRAVIS_BUILD_DIR/deploy/
cd $TRAVIS_BUILD_DIR/breeze_out
zip -r $TRAVIS_BUILD_DIR/deploy/$app_output_zip_name $app_output_name/*
#tests #tests
echo $log_prefix no tests to run echo $log_prefix no tests to run
echo $log_prefix contents of TRAVIS_BUILD_DIR
cd $TRAVIS_BUILD_DIR
ls
echo $log_prefix contents of the app-builds folder
cd $TRAVIS_BUILD_DIR/Breeze.UI/app-builds/
ls
echo $log_prefix FINISHED build echo $log_prefix FINISHED build
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment