Skip to content

Commit

Permalink
Bugfix: wrong variable assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
pabera committed Dec 7, 2023
1 parent c3d0897 commit 3ffe8a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions installation/includes/02_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,19 @@ get_version_string() {
local version_minor
local version_patch

version_major=$(grep 'VERSION_MAJOR\s*=\s*[0-9]*' "$python_file" | awk -F= '{print $2}' | tr -d ' ')
version_minor=$(grep 'VERSION_MINOR\s*=\s*[0-9]*' "$python_file" | awk -F= '{print $2}' | tr -d ' ')
version_patch=$(grep 'VERSION_PATCH\s*=\s*[0-9]*' "$python_file" | awk -F= '{print $2}' | tr -d ' ')
version_major=$(grep 'VERSION_MAJOR\s*=\s*[0-9]*' "${python_file}" | awk -F= '{print $2}' | tr -d ' ')
version_minor=$(grep 'VERSION_MINOR\s*=\s*[0-9]*' "${python_file}" | awk -F= '{print $2}' | tr -d ' ')
version_patch=$(grep 'VERSION_PATCH\s*=\s*[0-9]*' "${python_file}" | awk -F= '{print $2}' | tr -d ' ')

if [ -n "$version_major" ] && [ -n "$version_minor" ] && [ -n "$version_patch" ]; then
local version_string="${version_major}.${version_minor}.${version_patch}"
echo "$version_string"
echo "Jukebox Version: ${version_string}"
else
echo "Unable to extract version information from $python_file"
echo "Unable to extract version information from ${python_file}"
fi
}

### Verify helpers

print_verify_installation() {
echo ""
echo " -------------------------------------------------------"
Expand Down
2 changes: 1 addition & 1 deletion installation/routines/setup_jukebox_webapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ _jukebox_webapp_build() {

_jukebox_webapp_download() {
echo " Downloading web application" | tee /dev/fd/3
local JUKEBOX_VERSION==$(get_version_string "${INSTALLATION_PATH}/src/jukebox/jukebox/version.py")
local JUKEBOX_VERSION=$(get_version_string "${INSTALLATION_PATH}/src/jukebox/jukebox/version.py")
local TAR_FILENAME="webapp-build.tar.gz"

cd "${INSTALLATION_PATH}/src/webapp" || exit_on_error
Expand Down

0 comments on commit 3ffe8a3

Please sign in to comment.