Skip to content

Commit a3aa5d1

Browse files
committed
Merge branch 'release-v0.15.0' into release
2 parents 9b944da + a7bcff2 commit a3aa5d1

File tree

30 files changed

+2676
-1427
lines changed

30 files changed

+2676
-1427
lines changed

.circleci/config.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,34 @@ jobs:
7070
npm --prefix ./glean run build:webext
7171
npm --prefix ./glean run build:cli
7272
npm --prefix ./glean link
73+
# JS sample related jobs
7374
- run:
7475
name: Install Javascript dependencies for the JS sample
7576
command: |
7677
npm --prefix ./samples/web-extension/javascript install
7778
npm --prefix ./samples/web-extension/javascript link @mozilla/glean
7879
- run:
7980
name: Build the JS sample
80-
command: npm --prefix ./samples/web-extension/javascript run build
81+
command: |
82+
npm --prefix ./samples/web-extension/javascript run build
83+
- run:
84+
name: Run JS sample test
85+
command: |
86+
export PATH=.:$PATH && npm --prefix ./samples/web-extension/javascript run test
87+
# TS sample related jobs
88+
- run:
89+
name: Install Typescript dependencies for the TS sample
90+
command: |
91+
npm --prefix ./samples/web-extension/typescript install
92+
npm --prefix ./samples/web-extension/typescript link @mozilla/glean
93+
- run:
94+
name: Build the TS sample
95+
command: |
96+
npm --prefix ./samples/web-extension/typescript run build
8197
- run:
82-
name: Run samples tests
83-
command: export PATH=.:$PATH && npm --prefix ./samples/web-extension/javascript run test
98+
name: Run TS sample test
99+
command: |
100+
export PATH=.:$PATH && npm --prefix ./samples/web-extension/typescript run test
84101
85102
check-size:
86103
docker:
@@ -118,7 +135,8 @@ jobs:
118135
python3 -m venv venv
119136
source venv/bin/activate
120137
pip install -r requirements.txt
121-
glean_parser translate metrics.yaml pings.yaml -f javascript -o generated --option platform=qt
138+
glean_parser translate metrics.yaml pings.yaml -f javascript -o generated \
139+
--option platform=qt --option version="0.15";
122140
123141
sudo apt-get install xvfb
124142
xvfb-run python main.py &> qml.log &
@@ -191,8 +209,8 @@ jobs:
191209
# Attach Qt build to release
192210
npm --prefix ./glean install
193211
npm --prefix ./glean run build:qt
194-
cp glean/dist/glean.js glean/dist/glean_js-${CIRCLE_TAG}-qt.js
195-
./ghr -u mozilla -replace ${CIRCLE_TAG} glean/dist/glean_js-${CIRCLE_TAG}-qt.js
212+
tar -zcvf "glean/dist/glean_js-${CIRCLE_TAG}-qt.tar.gz" glean/dist/qt
213+
./ghr -u mozilla -replace ${CIRCLE_TAG} glean/dist/glean_js-${CIRCLE_TAG}-qt.tar.gz
196214
197215
workflows:
198216
version: 2

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Unreleased changes
22

3-
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.14.1...main)
3+
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.15.0...main)
4+
5+
# v0.15.0 (2021-06-03)
6+
7+
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.14.1...v0.15.0)
8+
9+
* [#389](https://github.com/mozilla/glean.js/pull/389): BUGFIX: Make sure to submit a `deletion-request` ping before clearing data when toggling upload.
10+
* [#375](https://github.com/mozilla/glean.js/pull/375): Release Glean.js for Qt as a QML module.
411

512
# v0.14.1 (2021-05-21)
613

bin/prepare-qml-module.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
#
3+
# This Source Code Form is subject to the terms of the Mozilla Public
4+
# License, v. 2.0. If a copy of the MPL was not distributed with this
5+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
7+
set -eo pipefail
8+
9+
WORKSPACE_ROOT="$( cd "$(dirname "$0")/.." ; pwd -P )"
10+
11+
# Get @mozilla/glean current version without the patch version.
12+
# Qt import paths may only have major and minor version.
13+
GLEAN_VERSION=$(node -p -e "require('${WORKSPACE_ROOT}/glean/package.json').version.split('.').reverse().slice(1).reverse().join('.')")
14+
15+
# Create the qmldir file
16+
FILE=glean/dist/qt/org/mozilla/Glean/qmldir
17+
touch "${WORKSPACE_ROOT}/${FILE}"
18+
{
19+
echo module org.mozilla.Glean
20+
echo Glean $GLEAN_VERSION glean.js
21+
} >> "${WORKSPACE_ROOT}/${FILE}"
22+
23+
# Add the glean.js file to the final module
24+
cp "${WORKSPACE_ROOT}/glean/src/index/qt.js" "${WORKSPACE_ROOT}/glean/dist/qt/org/mozilla/Glean/glean.js"

bin/prepare-release.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,32 @@ run $SED -i.bak -E \
113113
"${WORKSPACE_ROOT}/${FILE}"
114114
run rm "${WORKSPACE_ROOT}/${FILE}.bak"
115115

116+
### Qt sample app ###
117+
# Qt changes are necessary because QML requires that you add
118+
# version number along with the import statements.
119+
120+
# This gets the version string without the patch version.
121+
GLEAN_VERSION_FOR_QML=$(node -p -e "'${NEW_VERSION}'.split('.').reverse().slice(1).reverse().join('.')")
122+
123+
FILE=samples/qt-qml-app/main.qml
124+
run $SED -i.bak -E \
125+
-e "s/import org.mozilla.Glean [0-9a-z.-]+/import org.mozilla.Glean ${GLEAN_VERSION_FOR_QML};/" \
126+
-e "s/import generated [0-9a-z.-]+/import generated ${GLEAN_VERSION_FOR_QML};/" \
127+
"${WORKSPACE_ROOT}/${FILE}"
128+
run rm "${WORKSPACE_ROOT}/${FILE}.bak"
129+
130+
FILE=samples/qt-qml-app/README.md
131+
run $SED -i.bak -E \
132+
-e "s/--option platform=qt --option version=[0-9a-z.-]+/--option platform=qt --option version=\"${GLEAN_VERSION_FOR_QML}\";/" \
133+
"${WORKSPACE_ROOT}/${FILE}"
134+
run rm "${WORKSPACE_ROOT}/${FILE}.bak"
135+
136+
FILE=.circleci/config.yml
137+
run $SED -i.bak -E \
138+
-e "s/--option platform=qt --option version=[0-9a-z.-]+/--option platform=qt --option version=\"${GLEAN_VERSION_FOR_QML}\";/" \
139+
"${WORKSPACE_ROOT}/${FILE}"
140+
run rm "${WORKSPACE_ROOT}/${FILE}.bak"
141+
116142
echo "Everything prepared for v${NEW_VERSION}"
117143
echo
118144
echo "Changed files:"

docs/troubleshooting.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

glean/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dist
22
venv
33
node_modules
4+
qt.js

0 commit comments

Comments
 (0)