From 7e0fede7bedec90ef27d4d8df50b84a565b9042b Mon Sep 17 00:00:00 2001 From: rosahbruno Date: Mon, 22 Aug 2022 14:48:27 -0400 Subject: [PATCH 1/4] Add notes about version numbers in QT docs --- samples/qt/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/qt/README.md b/samples/qt/README.md index bb13a8a9e..4cf7be6b3 100644 --- a/samples/qt/README.md +++ b/samples/qt/README.md @@ -33,9 +33,11 @@ pip3 install -r requirements.txt # Install glean_parser 4. Generate metrics and pings files: +> **Note**: The version number below should match the last [released version](https://github.com/mozilla/glean.js/releases) number (minus the trailing `.0`). If the version numbers are different you will run into issues with QML code compilation. To resolve these errors you have to adjust the versions manually in the QML files + ```bash glean_parser translate src/App/metrics.yaml src/App/pings.yaml -f javascript -o src/App/generated \ ---option platform=qt --option version="0.31" +--option platform=qt --option version="1.1" ``` 5. Build the app: From ed01637b1c1d30d8675fe011177150c736fb9688 Mon Sep 17 00:00:00 2001 From: Bruno Rosa Date: Mon, 22 Aug 2022 14:52:23 -0400 Subject: [PATCH 2/4] Fix version regex in prepare-release script 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. --- bin/prepare-release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/prepare-release.sh b/bin/prepare-release.sh index eb033810c..391521ec7 100755 --- a/bin/prepare-release.sh +++ b/bin/prepare-release.sh @@ -142,13 +142,13 @@ run rm "${WORKSPACE_ROOT}/${FILE}.bak" FILE=samples/qt/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}\"/" \ + -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" FILE=.circleci/config.yml run $SED -i.bak -E \ - -e "s/--option platform=qt --option version=[0-9a-z.-]+/--option platform=qt --option version=\"${GLEAN_VERSION_FOR_QML}\"/" \ + -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" From a07a97a0a3aff40b615f4def36797f2dea4ecd83 Mon Sep 17 00:00:00 2001 From: Bruno Rosa Date: Mon, 22 Aug 2022 15:06:57 -0400 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 851b88fd4..9c737fef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ [Full changelog](https://github.com/mozilla/glean.js/compare/v1.1.0...main) +* [#1449](https://github.com/mozilla/glean.js/pull/1449): BUGFIX: Add missing quotes to `prepare-build` script to fix issues with version numbers in QT sample README & circle ci config. +* [#1449](https://github.com/mozilla/glean.js/pull/1449): Update QT sample project docs to include note about problems with different version numbers of QT commands. + # v1.1.0 (2022-07-18) [Full changelog](https://github.com/mozilla/glean.js/compare/v1.0.0...v1.1.0) From 6d59d6fa1ffa2ce056a02b90f9cad446621f30a6 Mon Sep 17 00:00:00 2001 From: Bruno Rosa Date: Tue, 23 Aug 2022 07:35:47 -0400 Subject: [PATCH 4/4] Update CHANGELOG.md Co-authored-by: Jan-Erik Rediger --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c737fef2..8822b4438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ [Full changelog](https://github.com/mozilla/glean.js/compare/v1.1.0...main) -* [#1449](https://github.com/mozilla/glean.js/pull/1449): BUGFIX: Add missing quotes to `prepare-build` script to fix issues with version numbers in QT sample README & circle ci config. -* [#1449](https://github.com/mozilla/glean.js/pull/1449): Update QT sample project docs to include note about problems with different version numbers of QT commands. +* [#1449](https://github.com/mozilla/glean.js/pull/1449): BUGFIX: Add missing quotes to `prepare-release` script to fix issues with version numbers in Qt sample README & circle ci config. +* [#1449](https://github.com/mozilla/glean.js/pull/1449): Update Qt sample project docs to include note about problems with different version numbers of Qt commands. # v1.1.0 (2022-07-18)