-
Notifications
You must be signed in to change notification settings - Fork 242
Build scripts: Use file name for grep directly #2397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -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 | ||
| ;; | ||
|
|
||
| esac | ||
| done | ||
|
|
||
|
|
@@ -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}" | ||
|
|
@@ -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)" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change from I've filed #2421 to fix this. |
||
|
|
||
| # Build installer image | ||
| "${dmgbuild_bin}" -s "${macdeploy_path}/deployment_settings.py" -D background="${resources_path}/installerbackground.png" \ | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fancy automating it?
https://github.com/lovesegfault/beautysh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still sounds scary
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or separately.
There was a problem hiding this comment.
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)