Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion distributions/build-debian-package-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cp -r debian ..
cd ..

# get the jamulus version from pro file
VERSION=$(cat Jamulus.pro | grep -oP 'VERSION = \K\w[^\s\\]*')
VERSION=$(grep -oP 'VERSION = \K\w[^\s\\]*' Jamulus.pro)

export DEBFULLNAME=GitHubActions DEBEMAIL=noemail@example.com

Expand Down
16 changes: 8 additions & 8 deletions mac/deploy_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ cert_name=""

while getopts 'hs:' flag; do
case "${flag}" in
s)
cert_name=$OPTARG
s)
cert_name=$OPTARG
if [[ -z "$cert_name" ]]; then
echo "Please add the name of the certificate to use: -s \"<name>\""
fi
# shift 2
;;
h)
echo "Usage: -s <cert name> for signing mac build"
exit 0
h)
echo "Usage: -s <cert name> for signing mac build"
exit 0
;;
*)
exit 1
;;

Comment on lines +15 to +29
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When working on style in this script anyway, then I'll add this here as well: ;)
I'd indent like described in this style guide (but with 4 spaces instead of 2, similar to what we do for if/while etc.)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means there will be some border cases this Python program won't be able to process. But in tests with large Linux system Bash scripts, its error-free score was ~99%.

Still sounds scary

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concerning indentation: I think this should be in #2402

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or separately.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's now in the mentioned PR anyway (as own commit)

esac
done

Expand All @@ -44,7 +44,7 @@ build_app()
{
# Build Jamulus
qmake "${project_path}" -o "${build_path}/Makefile" "CONFIG+=release" ${@:2}
local target_name="$(cat "${build_path}/Makefile" | sed -nE 's/^QMAKE_TARGET *= *(.*)$/\1/p')"
local target_name=$(sed -nE 's/^QMAKE_TARGET *= *(.*)$/\1/p' "${build_path}/Makefile")
local job_count="$(sysctl -n hw.ncpu)"

make -f "${build_path}/Makefile" -C "${build_path}" -j "${job_count}"
Expand Down Expand Up @@ -73,7 +73,7 @@ build_installer_image()
local dmgbuild_bin="$(python -c 'import site; print(site.USER_BASE)')/bin/dmgbuild"

# Get Jamulus version
local app_version="$(cat "${project_path}" | sed -nE 's/^VERSION *= *(.*)$/\1/p')"
local app_version="$(grep -oP 'VERSION = \K\w[^\s\\]*' Jamulus.pro)"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change from sed -nE to grep -oP breaks on Mac. See https://github.com/jamulussoftware/jamulus/runs/5247842643?check_suite_focus=true#step:6:1652

I've filed #2421 to fix this.


# Build installer image
"${dmgbuild_bin}" -s "${macdeploy_path}/deployment_settings.py" -D background="${resources_path}/installerbackground.png" \
Expand Down