Unverified Commit d9885e69 authored by Jeremy Bokobza's avatar Jeremy Bokobza Committed by GitHub

Merge pull request #374 from bokobza/master

Linux packaging 
parents f297ff56 0b83520b
......@@ -55,7 +55,10 @@ deploy:
api_key:
secure: $secure_github_key # this key is set on the Travis build page
file_glob: true
file: "$TRAVIS_BUILD_DIR/deploy/*.zip"
file:
- "$TRAVIS_BUILD_DIR/deploy/*.zip"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.deb"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.tar.gz"
skip_cleanup: true
overwrite: true
prerelease: true
......
......@@ -10,15 +10,17 @@
"buildResources": "dist/assets/images"
},
"win": {
"icon": "dist/assets/images",
"target": ["nsis"]
"icon": "dist/assets/images/icon",
"target": ["nsis"],
"artifactName": "${productName}.v${version}.setup.${os}.${env.arch}.${ext}"
},
"linux": {
"target": [
"deb",
"tar.gz"
],
"category": "Utility"
"category": "Utility",
"artifactName": "${productName}.v${version}.setup.${os}.${arch}.${ext}"
},
"nsis": {
"oneClick": false,
......@@ -26,10 +28,8 @@
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": true,
"guid": "ed20df62-ff5a-4b83-a5e3-a361357c6e51",
"createDesktopShortcut": false,
"createStartMenuShortcut": true,
"artifactName": "${productName}.v${version}.setup.${env.win_runtime}.${ext}"
"createDesktopShortcut": true,
"createStartMenuShortcut": true
},
"msi": {
"warningsAsErrors": false
......
......@@ -158,11 +158,10 @@ function startBitcoinApi() {
let apiPath = path.resolve(__dirname, 'assets//daemon//Stratis.BreezeD');
if (os.platform() === 'win32') {
apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe');
}
// 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');
} else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} //else {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD');
// }
......@@ -190,11 +189,10 @@ function startStratisApi() {
let apiPath = path.resolve(__dirname, 'assets//daemon//Stratis.BreezeD');
if (os.platform() === 'win32') {
apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe');
}
// 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');
} else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} //else {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD');
// }
if (!testnet) {
......
......@@ -42,22 +42,26 @@ git submodule update --init --recursive
cd $TRAVIS_BUILD_DIR/Breeze.UI
npm install
npm install -g npx
echo $log_prefix FINISHED restoring dotnet and npm packages
# dotnet publish
echo $log_prefix running 'dotnet publish'
cd $TRAVIS_BUILD_DIR/StratisBitcoinFullNode/Stratis.BreezeD
dotnet publish -c $configuration -r $TRAVIS_OS_NAME-$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
chmod +x $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/Stratis.BreezeD
chmod +x $TRAVIS_BUILD_DIR/Breeze.UI/daemon/Stratis.BreezeD
# node Build
cd $TRAVIS_BUILD_DIR/Breeze.UI
echo $log_prefix running 'npm run'
npm run build:prod
# node packaging
if [ "$TRAVIS_OS_NAME" = "osx" ]
then
# node packaging
echo $log_prefix packaging breeze
node package.js --platform=$os_platform --arch=$arch --path=$TRAVIS_BUILD_DIR/breeze_out
......@@ -68,7 +72,7 @@ mv $TRAVIS_BUILD_DIR/breeze_out/$node_output_name $TRAVIS_BUILD_DIR/breeze_out/$
# 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
cp -r $TRAVIS_BUILD_DIR/Breeze.UI/daemon/* $dotnet_resources_path_in_app
# zip result
echo $log_prefix zipping the app into $TRAVIS_BUILD_DIR/breeze_out/$app_output_zip_name
......@@ -76,6 +80,14 @@ 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/*
else
# node packaging
echo $log_prefix packaging breeze
npx electron-builder build --$TRAVIS_OS_NAME --$arch
echo $log_prefix finished packaging
fi
#tests
echo $log_prefix no tests to run
......
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