Incremented version and corrected whitespace in buildPackages.sh

This commit is contained in:
OLEGSHA 2021-01-21 18:15:50 +03:00
parent fcf225f9c7
commit 85edc07c75
2 changed files with 23 additions and 23 deletions

View File

@ -3,17 +3,17 @@
# #
# Progressia # Progressia
# Copyright (C) 2020-2021 Wind Corporation and contributors # Copyright (C) 2020-2021 Wind Corporation and contributors
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or # the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# #
@ -24,24 +24,24 @@ buildDebianPackage() {
# Commands that must be available to execute this action # Commands that must be available to execute this action
requiredCommands='dpkg-deb fakeroot' requiredCommands='dpkg-deb fakeroot'
# Package name. Sync with control file manually! # Package name. Sync with control file manually!
name='progressia-techdemo' name='progressia-techdemo'
# Version that the package will receive. Sync with control file manually! # Version that the package will receive. Sync with control file manually!
version='1.0_all' version='1.0_all'
# This directory will be copied into $tmpDir # This directory will be copied into $tmpDir
templateDirectory="build_packages/DEB/template" templateDirectory="build_packages/DEB/template"
# Files that must be present # Files that must be present
requiredFiles="$templateDirectory/DEBIAN/control" requiredFiles="$templateDirectory/DEBIAN/control"
nameAndVersion="$name-$version" nameAndVersion="$name-$version"
tmpDir="build_packages/DEB/$nameAndVersion" tmpDir="build_packages/DEB/$nameAndVersion"
outputFile="build_packages/DEB/$nameAndVersion.deb" outputFile="build_packages/DEB/$nameAndVersion.deb"
echo "Checking environment to build Debian package" echo "Checking environment to build Debian package"
for item in $requiredCommands; do for item in $requiredCommands; do
if command -v "$item" &> /dev/null; then if command -v "$item" &> /dev/null; then
echo "- $item found" echo "- $item found"
@ -50,7 +50,7 @@ buildDebianPackage() {
exit 100 exit 100
fi fi
done done
for file in $requiredFiles; do for file in $requiredFiles; do
if ! [ -r "$file" ]; then if ! [ -r "$file" ]; then
echoerr "$file is missing or not readable, cannot package" echoerr "$file is missing or not readable, cannot package"
@ -59,13 +59,13 @@ buildDebianPackage() {
echo "- $file is present and readable" echo "- $file is present and readable"
fi fi
done done
echo "Environment OK; packaging Debian package" echo "Environment OK; packaging Debian package"
exitCode=0 exitCode=0
{ {
shareDir="$tmpDir/usr/share/progressia" shareDir="$tmpDir/usr/share/progressia"
mkdir -p "$tmpDir" && mkdir -p "$tmpDir" &&
mkdir -p "$shareDir" && mkdir -p "$shareDir" &&
cp -r "$templateDirectory"/* "$tmpDir" && cp -r "$templateDirectory"/* "$tmpDir" &&
@ -79,7 +79,7 @@ buildDebianPackage() {
echoerr "Could not create Debian package" echoerr "Could not create Debian package"
exitCode=1 exitCode=1
} }
{ {
if [ -d "$tmpDir" ]; then if [ -d "$tmpDir" ]; then
rm -r "$tmpDir" rm -r "$tmpDir"
@ -89,7 +89,7 @@ buildDebianPackage() {
echoerr "Could not clean up after packaging Debian package" echoerr "Could not clean up after packaging Debian package"
exitCode=2 exitCode=2
} }
exit "$exitCode" exit "$exitCode"
} }
@ -97,15 +97,15 @@ buildWindowsInstaller() {
# Commands that must be available to execute this action # Commands that must be available to execute this action
requiredCommands='makensis' requiredCommands='makensis'
# NSIS configuration file that must be present # NSIS configuration file that must be present
configurationFile='build_packages/NSIS/ProgressiaInstaller.nsi' configurationFile='build_packages/NSIS/ProgressiaInstaller.nsi'
# File that will be output # File that will be output
outputFile='build_packages/NSIS/ProgressiaInstaller.exe' outputFile='build_packages/NSIS/ProgressiaInstaller.exe'
echo "Checking environment to build Windows installer" echo "Checking environment to build Windows installer"
for item in $requiredCommands; do for item in $requiredCommands; do
if command -v "$item" &> /dev/null; then if command -v "$item" &> /dev/null; then
echo "- $item found" echo "- $item found"
@ -114,17 +114,17 @@ buildWindowsInstaller() {
exit 100 exit 100
fi fi
done done
if ! [ -r "$configurationFile" ]; then if ! [ -r "$configurationFile" ]; then
echoerr "$configurationFile is missing or not readable, cannot build" echoerr "$configurationFile is missing or not readable, cannot build"
exit 101 exit 101
else else
echo "- $configurationFile is present and readable" echo "- $configurationFile is present and readable"
fi fi
echo "Environment OK; building Windows installer" echo "Environment OK; building Windows installer"
exitCode=0 exitCode=0
{ {
cp -r 'build/libs/lib' 'build_packages/NSIS/lib' && cp -r 'build/libs/lib' 'build_packages/NSIS/lib' &&
cp 'build/libs/Progressia.jar' 'build_packages/NSIS/Progressia.jar' && cp 'build/libs/Progressia.jar' 'build_packages/NSIS/Progressia.jar' &&
@ -137,7 +137,7 @@ buildWindowsInstaller() {
echoerr "Could not build Windows installer" echoerr "Could not build Windows installer"
exitCode=1 exitCode=1
} }
{ {
if [ -d 'build_packages/NSIS/lib' ]; then if [ -d 'build_packages/NSIS/lib' ]; then
rm -r 'build_packages/NSIS/lib' rm -r 'build_packages/NSIS/lib'
@ -153,7 +153,7 @@ buildWindowsInstaller() {
echoerr "Could not clean up after building Windows installer" echoerr "Could not clean up after building Windows installer"
exitCode=2 exitCode=2
} }
exit "$exitCode" exit "$exitCode"
} }

View File

@ -50,7 +50,7 @@ public class LayerAbout extends GUILayer {
new Label( new Label(
"Version", "Version",
font, font,
new MutableStringLocalized("LayerAbout.Version").format("TechDemo") new MutableStringLocalized("LayerAbout.Version").format("pre-alpha 1")
) )
); );