Commit a471f922 authored by Jeremy Bokobza's avatar Jeremy Bokobza

added linux packaging

parent c34c8b0a
......@@ -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
......
{
"appId": "com.stratisplatform.breeze",
"productName": "Breeze Wallet",
"artifactName": "${productName}.v${version}.setup.${os}.${arch}.${ext}"
"mac": {
"category": "com.stratisplatform.breeze"
},
......@@ -26,9 +27,7 @@
"deleteAppDataOnUninstall": true,
"guid": "ed20df62-ff5a-4b83-a5e3-a361357c6e51",
"createDesktopShortcut": false,
"createStartMenuShortcut": true,
"artifactName": "${productName}.v${version}.setup.${env.win_runtime}.${ext}"
"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') {
} else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD.exe');
} //else {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD.exe');
// } else {
// apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD.exe');
// }
......@@ -186,15 +185,14 @@ function startStratisApi() {
var stratisProcess;
const spawnStratis = require('child_process').spawn;
//Start Breeze Stratis Daemon
//Start Breeze Bitcoin Daemon
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') {
} else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD.exe');
} //else {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD.exe');
// } else {
// apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD.exe');
// }
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