mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 09:16:38 +00:00
chore: include Etcher version in installer/archive names
This commit is contained in:
parent
0bbcc10cfe
commit
b6817cfbb3
@ -114,33 +114,33 @@ function installer_zip {
|
|||||||
mkdir -p $output_directory
|
mkdir -p $output_directory
|
||||||
sign $source_directory/$APPLICATION_NAME.app
|
sign $source_directory/$APPLICATION_NAME.app
|
||||||
pushd $source_directory
|
pushd $source_directory
|
||||||
zip -r -9 Etcher-darwin-x64.zip $APPLICATION_NAME.app
|
zip -r -9 Etcher-$APPLICATION_VERSION-darwin-x64.zip $APPLICATION_NAME.app
|
||||||
popd
|
popd
|
||||||
mv $source_directory/Etcher-darwin-x64.zip $output_directory
|
mv $source_directory/Etcher-$APPLICATION_VERSION-darwin-x64.zip $output_directory
|
||||||
}
|
}
|
||||||
|
|
||||||
function installer_dmg {
|
function installer_dmg {
|
||||||
local source_directory=$1
|
local source_directory=$1
|
||||||
local output_directory=$2
|
local output_directory=$2
|
||||||
local temporal_dmg=$source_directory.dmg
|
local temporary_dmg=$source_directory.dmg
|
||||||
local volume_directory=/Volumes/$APPLICATION_NAME
|
local volume_directory=/Volumes/$APPLICATION_NAME
|
||||||
local volume_app=$volume_directory/$APPLICATION_NAME.app
|
local volume_app=$volume_directory/$APPLICATION_NAME.app
|
||||||
|
|
||||||
# Make sure any previous DMG was unmounted
|
# Make sure any previous DMG was unmounted
|
||||||
hdiutil detach $volume_directory || true
|
hdiutil detach $volume_directory || true
|
||||||
|
|
||||||
# Create temporal read-write DMG image
|
# Create temporary read-write DMG image
|
||||||
rm -f $temporal_dmg
|
rm -f $temporary_dmg
|
||||||
hdiutil create \
|
hdiutil create \
|
||||||
-srcfolder $source_directory \
|
-srcfolder $source_directory \
|
||||||
-volname "$APPLICATION_NAME" \
|
-volname "$APPLICATION_NAME" \
|
||||||
-fs HFS+ \
|
-fs HFS+ \
|
||||||
-fsargs "-c c=64,a=16,e=16" \
|
-fsargs "-c c=64,a=16,e=16" \
|
||||||
-format UDRW \
|
-format UDRW \
|
||||||
-size 600M $temporal_dmg
|
-size 600M $temporary_dmg
|
||||||
|
|
||||||
# Mount temporal DMG image, so we can modify it
|
# Mount temporary DMG image, so we can modify it
|
||||||
hdiutil attach $temporal_dmg -readwrite -noverify
|
hdiutil attach $temporary_dmg -readwrite -noverify
|
||||||
|
|
||||||
# Wait for a bit to ensure the image is mounted
|
# Wait for a bit to ensure the image is mounted
|
||||||
sleep 2
|
sleep 2
|
||||||
@ -204,20 +204,20 @@ function installer_dmg {
|
|||||||
|
|
||||||
sign $volume_app
|
sign $volume_app
|
||||||
|
|
||||||
# Unmount temporal DMG image.
|
# Unmount temporary DMG image.
|
||||||
hdiutil detach $volume_directory
|
hdiutil detach $volume_directory
|
||||||
|
|
||||||
# Convert temporal DMG image into a production-ready
|
# Convert temporary DMG image into a production-ready
|
||||||
# compressed and read-only DMG image.
|
# compressed and read-only DMG image.
|
||||||
mkdir -p $output_directory
|
mkdir -p $output_directory
|
||||||
rm -f $output_directory/Etcher-darwin-x64.dmg
|
rm -f $output_directory/Etcher-darwin-x64.dmg
|
||||||
hdiutil convert $temporal_dmg \
|
hdiutil convert $temporary_dmg \
|
||||||
-format UDZO \
|
-format UDZO \
|
||||||
-imagekey zlib-level=9 \
|
-imagekey zlib-level=9 \
|
||||||
-o $output_directory/Etcher-darwin-x64.dmg
|
-o $output_directory/Etcher-$APPLICATION_VERSION-darwin-x64.dmg
|
||||||
|
|
||||||
# Cleanup temporal DMG image.
|
# Cleanup temporary DMG image.
|
||||||
rm $temporal_dmg
|
rm $temporary_dmg
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ function installer {
|
|||||||
./scripts/build/AppImages/AppImageAssistant-$architecture $appdir_temporary_location $output_file
|
./scripts/build/AppImages/AppImageAssistant-$architecture $appdir_temporary_location $output_file
|
||||||
|
|
||||||
pushd $output_directory
|
pushd $output_directory
|
||||||
zip Etcher-linux-$architecture.zip Etcher-linux-$architecture.AppImage
|
zip Etcher-$APPLICATION_VERSION-linux-$architecture.zip Etcher-linux-$architecture.AppImage
|
||||||
rm Etcher-linux-$architecture.AppImage
|
rm Etcher-linux-$architecture.AppImage
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -132,8 +132,6 @@ if "%arch%"=="x64" (
|
|||||||
set electron_arch=x64
|
set electron_arch=x64
|
||||||
)
|
)
|
||||||
|
|
||||||
set package_name=Etcher-win32-%arch%
|
|
||||||
|
|
||||||
for /f %%i in (' "node -e ""console.log(require('./package.json').devDependencies['electron-prebuilt'])""" ') do (
|
for /f %%i in (' "node -e ""console.log(require('./package.json').devDependencies['electron-prebuilt'])""" ') do (
|
||||||
set electron_version=%%i
|
set electron_version=%%i
|
||||||
)
|
)
|
||||||
@ -158,6 +156,8 @@ for /f %%i in (' "node -v" ') do (
|
|||||||
set node_version=%%i
|
set node_version=%%i
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set package_name=Etcher-%etcher_version%-win32-%arch%
|
||||||
|
|
||||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
:: Configure NPM to build native addons for Electron correctly
|
:: Configure NPM to build native addons for Electron correctly
|
||||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
@ -214,9 +214,11 @@ call %electron_packager% . %application_name%^
|
|||||||
set package_output=%output_build_directory%\%package_name%
|
set package_output=%output_build_directory%\%package_name%
|
||||||
|
|
||||||
if not "%arch%"=="%electron_arch%" (
|
if not "%arch%"=="%electron_arch%" (
|
||||||
move %output_build_directory%\Etcher-win32-%electron_arch% %package_output%
|
move %output_build_directory%\Etcher-win32-%electron_arch% %output_build_directory%\Etcher-win32-%arch%
|
||||||
)
|
)
|
||||||
|
|
||||||
|
move %output_build_directory%\Etcher-win32-%arch% %package_output%
|
||||||
|
|
||||||
:: Omit *.dll and *.node files from the asar package, otherwise
|
:: Omit *.dll and *.node files from the asar package, otherwise
|
||||||
:: `process.dlopen` and `module.require` can't load them correctly.
|
:: `process.dlopen` and `module.require` can't load them correctly.
|
||||||
call asar pack %package_output%\resources\app %package_output%\resources\app.asar^
|
call asar pack %package_output%\resources\app %package_output%\resources\app.asar^
|
||||||
@ -242,7 +244,7 @@ cd %package_output%^
|
|||||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
|
|
||||||
set installer_tmp_output=%output_build_directory%\win32-%arch%-tmp-installer
|
set installer_tmp_output=%output_build_directory%\win32-%arch%-tmp-installer
|
||||||
set installer_output=%output_directory%\Etcher-win32-%arch%.exe
|
set installer_output=%output_directory%\%package_name%.exe
|
||||||
|
|
||||||
call %electron_builder% %package_output%^
|
call %electron_builder% %package_output%^
|
||||||
--platform=win^
|
--platform=win^
|
||||||
|
Loading…
x
Reference in New Issue
Block a user