-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix grep and sed usage #1162
fix grep and sed usage #1162
Conversation
VERSION_MAJOR=$(sed -n 's/project(DLAF VERSION \([0-9]\+\)\.[0-9]\+\.[0-9]\+)/\1/p' CMakeLists.txt) | ||
VERSION_MINOR=$(sed -n 's/project(DLAF VERSION [0-9]\+\.\([0-9]\+\)\.[0-9]\+)/\1/p' CMakeLists.txt) | ||
VERSION_PATCH=$(sed -n 's/project(DLAF VERSION [0-9]\+\.[0-9]\+\.\([0-9]\+\))/\1/p' CMakeLists.txt) | ||
VERSION_MAJOR=$(sed -n 's/project(DLAF VERSION \([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\))/\1/p' CMakeLists.txt) |
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.
[0-9]\+
is not supported by sed on macos.
(also [0-9]\{1,\}
is only supported by GNU sed)
VERSION_FULL="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" | ||
VERSION_FULL_TAG="v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" | ||
VERSION_TITLE="DLA-Future ${VERSION_FULL}" | ||
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | ||
RELEASE_DATE=$(date '+%Y-%m-%d') | ||
|
||
GREP_VERSION_FULL="$(echo ${VERSION_FULL} | sed s/\\./\\\\./g)" |
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.
Need to escape dots otherwise grep matches every char.
@RMeli, do you want the same changes on DLAFF? |
Since getting an instance on |
Will open a PR when merged. |
Closes #1158