Skip to content

Conversation

@rosahbruno
Copy link
Contributor

@rosahbruno rosahbruno commented Aug 22, 2022

Pull Request checklist

  • Quality: Make sure this PR builds and runs cleanly.
    • Inside the glean/ folder, run:
      • npm run test Runs all tests
      • npm run lint Runs all linters
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry to CHANGELOG.md or an explanation of why it does not need one
  • Documentation: This PR includes documentation changes, an explanation of why it does not need that or a follow-up bug has been filed to do that work

Additional context

I was able to test this locally by using this portion of the prepare-release script and running it from the /samples/qt directory.

set -eo pipefail

DOIT=y
SED="sed"
WORKSPACE_ROOT="."
NEW_VERSION=1.1.0 # change this to whatever version you want to test

run() {
  [ "${VERB:-0}" != 0 ] && echo "+ $*"
  if [ "$DOIT" = y ]; then
      "$@"
  else
      true
  fi
}

# This gets the version string without the patch version.
GLEAN_VERSION_FOR_QML=$(node -p -e "'${NEW_VERSION}'.split('.').reverse().slice(1).reverse().join('.')")
FILE=README.md
run $SED -i.bak -E \
    -e "s/--option platform=qt --option version=\"[0-9a-z.-]+\"/--option platform=qt --option version=\"${GLEAN_VERSION_FOR_QML}\"/" \
    "${WORKSPACE_ROOT}/${FILE}"
run rm "${WORKSPACE_ROOT}/${FILE}.bak"

rosahbruno and others added 2 commits August 22, 2022 14:48
The two regexes that are fixed in this commit were missing quotes around the version number. The `sed` commands were failing because of the missing quotes, which in turn meant that the auto-updating docs had old versions. In the QT sample, the version not updating can lead to compilation errors for developers and the error messages are not helpful.
@rosahbruno rosahbruno marked this pull request as ready for review August 22, 2022 19:16
@auto-assign auto-assign bot requested a review from Dexterp37 August 22, 2022 19:16
@rosahbruno rosahbruno force-pushed the 1786272-QT-sample-proj-updates branch from 05d57c6 to a07a97a Compare August 23, 2022 00:57
@badboy badboy requested review from badboy and removed request for Dexterp37 August 23, 2022 10:19
Copy link
Member

@badboy badboy left a comment

Choose a reason for hiding this comment

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

minimal nit, but otherwise good to go.

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
@rosahbruno rosahbruno changed the title Bug 1786272 - QT sample project updates Bug 1786272 - Qt sample project updates Aug 23, 2022
@rosahbruno rosahbruno merged commit 51addbe into mozilla:main Aug 23, 2022
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.

2 participants