Commit eb5fd07a authored by Jeremy Bokobza's avatar Jeremy Bokobza Committed by GitHub

Rename the name of folders in packages (#288)

* updated readme file

* changed release packages names

* put -ui suffix back in folder name

* roll back the app output name change

* rename node output folder
parent e169edf6
...@@ -24,7 +24,7 @@ pack(platform, arch, path, function done(err, appPath) { ...@@ -24,7 +24,7 @@ pack(platform, arch, path, function done(err, appPath) {
if (err) { if (err) {
console.log(err); console.log(err);
} else { } else {
console.log('Application packaged successfuly!', appPath); console.log('Application packaged successfully!', appPath);
} }
}); });
......
...@@ -44,8 +44,9 @@ environment: ...@@ -44,8 +44,9 @@ environment:
init: init:
- ps: | - ps: |
$env:log_prefix = "[$env:win_runtime][$env:configuration]" $env:log_prefix = "[$env:win_runtime][$env:configuration]"
$env:app_output_name = "breeze-$env:win_runtime-$env:configuration" $env:node_output_name = "breeze-ui-$env:plat-$env:arch"
$env:api_output_name = "api-$env:win_runtime-$env:configuration" $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" }
#---------------------------------# #---------------------------------#
...@@ -58,7 +59,9 @@ before_build: ...@@ -58,7 +59,9 @@ 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 "App output name: $env:app_output_name" -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"
...@@ -94,11 +97,14 @@ build_script: ...@@ -94,11 +97,14 @@ build_script:
Write-Host "$env:log_prefix packaging breeze" -foregroundcolor "magenta" Write-Host "$env:log_prefix packaging breeze" -foregroundcolor "magenta"
node package.js --platform=$env:plat --arch=$env:arch --path=$env:APPVEYOR_BUILD_FOLDER\breeze_out node package.js --platform=$env:plat --arch=$env:arch --path=$env:APPVEYOR_BUILD_FOLDER\breeze_out
Write-Host "$env:log_prefix rename the folder generated by npm from $env:node_output_name to $env:app_output_name" -foregroundcolor "magenta"
Rename-Item $env:APPVEYOR_BUILD_FOLDER\breeze_out\$env:node_output_name $env:app_output_name
Write-Host "$env:log_prefix copying the Breeze api into the app" -foregroundcolor "magenta" Write-Host "$env:log_prefix copying the Breeze api into the app" -foregroundcolor "magenta"
New-Item -Path $env:APPVEYOR_BUILD_FOLDER\breeze_out\breeze-ui-$env:plat-$env:arch\resources\app\assets\daemon -ItemType directory New-Item -Path $env:APPVEYOR_BUILD_FOLDER\breeze_out\$env:app_output_name\resources\app\assets\daemon -ItemType directory
xcopy /s $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:win_runtime\* $env:APPVEYOR_BUILD_FOLDER\breeze_out\breeze-ui-$env:plat-$env:arch\resources\app\assets\daemon\ xcopy /s $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:win_runtime\* $env:APPVEYOR_BUILD_FOLDER\breeze_out\$env:app_output_name\resources\app\assets\daemon\
Write-Host "$env:log_prefix zipping the result" -foregroundcolor "magenta" Write-Host "$env:log_prefix zipping the result" -foregroundcolor "magenta"
7z a $env:APPVEYOR_BUILD_FOLDER\breeze_out\$env:app_output_name.zip $env:APPVEYOR_BUILD_FOLDER\breeze_out\breeze-ui-$env:plat-$env:arch 7z a $env:APPVEYOR_BUILD_FOLDER\breeze_out\$env:app_output_zip_name $env:APPVEYOR_BUILD_FOLDER\breeze_out\$env:app_output_name
Write-Host "[$env:configuration][$env:win_runtime] FINISHED dotnet build" -foregroundcolor "magenta" Write-Host "[$env:configuration][$env:win_runtime] FINISHED dotnet build" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
......
...@@ -3,17 +3,18 @@ ...@@ -3,17 +3,18 @@
# exit if error # exit if error
set -o errexit set -o errexit
# define a few variables
node_output_name="breeze-ui-$os_platform-$arch"
app_output_name="breeze-$os_identifier-$arch"
app_output_zip_name="breeze-$os_identifier-$arch-$configuration.zip"
if [ "$TRAVIS_OS_NAME" = "osx" ] if [ "$TRAVIS_OS_NAME" = "osx" ]
then then
dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/breeze-ui.app/contents/resources/app/assets/daemon dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/$app_output_name/breeze-ui.app/contents/resources/app/assets/daemon
else else
dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/resources/app/assets/daemon dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/$app_output_name/resources/app/assets/daemon
fi fi
# define a few variables
app_output_name="breeze-$os_identifier-$arch-$configuration"
api_output_name="api-$os_identifier-$arch-$configuration"
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 "OS identifier:" $os_identifier
...@@ -22,8 +23,9 @@ echo "Build directory:" $TRAVIS_BUILD_DIR ...@@ -22,8 +23,9 @@ echo "Build directory:" $TRAVIS_BUILD_DIR
echo "Node version:" $TRAVIS_NODE_VERSION echo "Node version:" $TRAVIS_NODE_VERSION
echo "Architecture:" $arch echo "Architecture:" $arch
echo "Configuration:" $configuration echo "Configuration:" $configuration
echo "App output name:" $app_output_name echo "Node.js output name:" $node_output_name
echo "Api output name:" $api_output_name echo "App output folder name:" $app_output_name
echo "App output zip file name:" $app_output_zip_name
echo "dotnet resources path in app:" $dotnet_resources_path_in_app echo "dotnet resources path in app:" $dotnet_resources_path_in_app
echo "Branch:" $TRAVIS_BRANCH echo "Branch:" $TRAVIS_BRANCH
echo "Tag:" $TRAVIS_TAG echo "Tag:" $TRAVIS_TAG
...@@ -63,16 +65,20 @@ npm run build:prod ...@@ -63,16 +65,20 @@ npm run build:prod
echo $log_prefix packaging breeze echo $log_prefix packaging breeze
node package.js --platform=$os_platform --arch=$arch --path=$TRAVIS_BUILD_DIR/breeze_out node package.js --platform=$os_platform --arch=$arch --path=$TRAVIS_BUILD_DIR/breeze_out
# rename node generated folder
echo $log_prefix rename the folder generated by npm from $node_output_name to $app_output_name
mv $TRAVIS_BUILD_DIR/breeze_out/$node_output_name $TRAVIS_BUILD_DIR/breeze_out/$app_output_name
# copy api libs into app # copy api libs into app
echo $log_prefix copying the Breeze api into the app echo $log_prefix copying the Breeze api into the app
mkdir -p $dotnet_resources_path_in_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/dotnet_out/$TRAVIS_OS_NAME/* $dotnet_resources_path_in_app
# zip result # zip result
echo $log_prefix zipping the app into $TRAVIS_BUILD_DIR/breeze_out/$app_output_name.zip echo $log_prefix zipping the app into $TRAVIS_BUILD_DIR/breeze_out/$app_output_zip_name
mkdir -p $TRAVIS_BUILD_DIR/deploy/ mkdir -p $TRAVIS_BUILD_DIR/deploy/
cd $TRAVIS_BUILD_DIR/breeze_out cd $TRAVIS_BUILD_DIR/breeze_out
zip -r $TRAVIS_BUILD_DIR/deploy/$app_output_name.zip breeze-ui-$os_platform-$arch/* 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
......
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