Skip to content

Conversation

@hoffie
Copy link
Member

@hoffie hoffie commented Feb 21, 2022

Short description of changes

The build logic used grep -oP which does not seem to be supported by macOS' grep. Therefore, keep using sed instead.

Broken in: 3a63033 (#2397)

Context: Fixes an issue?

usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
	[-e pattern] [-f file] [--binary-files=value] [--color=when]
	[--context[=num]] [--directories=action] [--label] [--line-buffered]
	[--null] [pattern] [file ...]

Does this change need documentation? What needs to be documented and how?

No.

Status of this Pull Request

Ready.

What is missing until this pull request can be merged?

CI/Review.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@hoffie hoffie added this to the Release 3.9.0 milestone Feb 21, 2022
@hoffie
Copy link
Member Author

hoffie commented Feb 21, 2022

Test successful:

@hoffie hoffie requested a review from ann0see February 21, 2022 00:43
@hoffie hoffie requested a review from pljones February 21, 2022 08:14
brew install /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Formula/create-dmg@"${create_dmg_version}".rb
# Get Jamulus version
local app_version="$(grep -oP 'VERSION = \K\w[^\s\\]*' Jamulus.pro)"
local app_version="$(sed -nE 's/^VERSION *= *(.*)$/\1/p' Jamulus.pro)"
Copy link
Member

Choose a reason for hiding this comment

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

I think to be consistent with earlier versions and the rest of the script, this should use ${project_path}. Line 98 below doesn't actually check the directory we are running in, as ${project_path} is an absolute path, so the -f test always succeeds.

Suggested change
local app_version="$(sed -nE 's/^VERSION *= *(.*)$/\1/p' Jamulus.pro)"
local app_version="$(sed -nE 's/^VERSION *= *(.*)$/\1/p' ${project_path})"

Copy link
Member Author

Choose a reason for hiding this comment

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

I think to be consistent with earlier versions and the rest of the script, this should use ${project_path}

Thanks, changed. We should wait for another CI run though.

Line 98 below doesn't actually check the directory we are running in, as ${project_path} is an absolute path, so the -f test always succeeds.

Yeah, but I'd rather not touch this as part of this PR. I plan to submit my other autobuild changes really soon.

Copy link
Member

@softins softins Feb 21, 2022

Choose a reason for hiding this comment

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

I think to be consistent with earlier versions and the rest of the script, this should use ${project_path}

Thanks, changed. We should wait for another CI run though.

Yes, I'd like to test install the Mac artifact with the new create-dmg. Unfortunately, non-release runs don't make the artifacts available until the last job has finished, afaik.

Line 98 below doesn't actually check the directory we are running in, as ${project_path} is an absolute path, so the -f test always succeeds.

Yeah, but I'd rather not touch this as part of this PR. I plan to submit my other autobuild changes really soon.

Sure. My point was only to illustrate why it was important to use ${project_path} instead of a simple filename, as the script doesn't actually ensure we are in the correct directory.

The build logic used `grep -oP` which does not seem to be supported by
macOS' `grep`. Therefore, keep using `sed` instead.

Broken in: 3a63033

Co-authored-by: Tony Mountifield <tony@mountifield.org>
@hoffie hoffie force-pushed the mac-bad-version-grep branch from 2735858 to 2e06d1d Compare February 21, 2022 18:04
Copy link
Member

@softins softins left a comment

Choose a reason for hiding this comment

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

Successfully installed the dmg from this build, so happy to approve.

@hoffie hoffie merged commit d179702 into jamulussoftware:master Feb 21, 2022
@hoffie hoffie deleted the mac-bad-version-grep branch February 21, 2022 20:20
@ann0see
Copy link
Member

ann0see commented Jun 18, 2022

Probably a
CHANGELOG: SKIP
(just edit this message if we don't skip it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants