-
-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: impove shellcheck and auto read version number (#155)
* chore: improve shellcheck compatibility Improve shellcheck compatibility of config/default Signed-off-by: Stephan Wendel <me@stephanwe.de> * chore: improve shellcheck compatibility Improve shellcheck compatibility of config/raspberry/default Signed-off-by: Stephan Wendel <me@stephanwe.de> * chore: improve shellcheck compatibility Improve shellcheck compatibilty of config/raspberry/rpi32 Signed-off-by: Stephan Wendel <me@stephanwe.de> * chore: add version file add version file to trigger Release Builds Signed-off-by: Stephan Wendel <me@stephanwe.de> * chore: change function name to get version number Signed-off-by: Stefan Dej <meteyou@gmail.com> Signed-off-by: Stephan Wendel <me@stephanwe.de> Signed-off-by: Stefan Dej <meteyou@gmail.com> Co-authored-by: Stefan Dej <meteyou@gmail.com>
- Loading branch information
Showing
4 changed files
with
54 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,32 @@ | ||
export DIST_NAME=MainsailOS | ||
export DIST_VERSION=0.7.1 | ||
export BASE_ZIP_IMG=`ls -t ${DIST_PATH}/image/*.{zip,7z,xz} | head -n 1` | ||
#!/usr/bin/env bash | ||
# Shebang for better file detection | ||
# shellcheck enable=require-variable-braces | ||
|
||
get_version() { | ||
local ver | ||
ver="$(realpath "$( dirname -- "${BASH_SOURCE[0]}")"/version)" | ||
cat "${ver}" | ||
} | ||
|
||
get_img_name() { | ||
local -a types | ||
types=(zip 7z xz) | ||
if [ -n "${DIST_PATH}" ]; then | ||
for i in "${types[@]}"; do | ||
find "${DIST_PATH}/image/" -type f -name "*.${i}" -printf "%p\n" | ||
done | ||
fi | ||
|
||
if [ -z "${DIST_PATH}" ]; then | ||
echo "" | ||
fi | ||
} | ||
|
||
DIST_VERSION="$(get_version)" | ||
BASE_ZIP_IMG="$(get_img_name)" | ||
DIST_NAME="MainsailOS" | ||
|
||
# export Variables | ||
export DIST_NAME | ||
export DIST_VERSION | ||
export BASE_ZIP_IMG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
#!/usr/bin/env bash | ||
# Shebang for better file detection | ||
|
||
export BASE_IMAGE_ENLARGEROOT=2500 | ||
export BASE_IMAGE_RESIZEROOT=600 | ||
# Declare Variables before exporting. | ||
# See https://www.shellcheck.net/wiki/SC2155 | ||
|
||
BASE_IMAGE_ENLARGEROOT=2500 | ||
BASE_IMAGE_RESIZEROOT=600 | ||
# Compress not needed due compression done in workflow | ||
export BASE_RELEASE_COMPRESS=no | ||
BASE_RELEASE_COMPRESS=no | ||
# Modules are valid for 32bit and 64bit images | ||
export MODULES="base,pkgupgrade,mainsailos(net,piconfig,klipper,is_req_preinstall,moonraker,timelapse,mainsail,crowsnest,sonar,password-for-sudo),postrename" | ||
MODULES="base,pkgupgrade,mainsailos(net,piconfig,klipper,is_req_preinstall,moonraker,timelapse,mainsail,crowsnest,sonar,password-for-sudo),postrename" | ||
|
||
# export Variables | ||
export BASE_IMAGE_ENLARGEROOT | ||
export BASE_IMAGE_RESIZEROOT | ||
export BASE_RELEASE_COMPRESS | ||
export MODULES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
#!/usr/bin/env bash | ||
# Shebang for better file detection | ||
|
||
export DOWNLOAD_URL_CHECKSUM="https://downloads.raspberrypi.org/raspios_lite_armhf_latest.sha256" | ||
export DOWNLOAD_URL_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf_latest.torrent" | ||
# Declare Variables before exporting. | ||
# See https://www.shellcheck.net/wiki/SC2155 | ||
|
||
DOWNLOAD_URL_CHECKSUM="https://downloads.raspberrypi.org/raspios_lite_armhf_latest.sha256" | ||
DOWNLOAD_URL_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf_latest.torrent" | ||
|
||
export DOWNLOAD_URL_CHECKSUM | ||
export DOWNLOAD_URL_IMAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.7.1 |