From bc7621c25d40172d046a43df13a44644bf7e070c Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 29 Jun 2023 09:48:30 +0200 Subject: [PATCH] Updates #3207 - Generate po files in the release checkout Refactor the Makefile somewhat. - Rename `make release` to `make version` - Add `make release-checkout` which checks out the release branch --- CHANGES.md | 4 +++- Makefile | 30 ++++++++++++++++-------------- RELEASE.md | 16 ++++++++-------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3d249db24..4081f6b49 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,9 @@ ## 10.1.5 (Unreleased) -- #3209: Fix error when importing the `converse` global with bootstrap modal API. +- #3209: Fix error when importing the `converse` global with bootstrap modal API +- #3207: `.po` translation files weren't included in previous release +- Updated Galician and Portuguese translations ## 10.1.4 (2023-06-25) diff --git a/Makefile b/Makefile index ef67ad86a..3ad9193b1 100644 --- a/Makefile +++ b/Makefile @@ -65,9 +65,6 @@ certs: ######################################################################## ## Translation machinery -dist/converse-no-dependencies.js: src webpack/webpack.common.js webpack/webpack.nodeps.js @converse/headless node_modules - npm run nodeps - GETTEXT = $(XGETTEXT) --from-code=UTF-8 --language=JavaScript --keyword=__ --keyword=___ --keyword=i18n_ --force-po --output=src/i18n/converse.pot --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=10.1.4 dist/converse-no-dependencies.js -c src/i18n/converse.pot: dist/converse-no-dependencies.js @@ -85,10 +82,8 @@ po: ######################################################################## ## Release management -.PHONY: release -release: - rm -rf release && mkdir release - cd release +.PHONY: version +version: $(SED) -i '/^export const VERSION_NAME =/s/=.*/= "v$(VERSION)";/' src/headless/shared/constants.js $(SED) -i '/Version:/s/:.*/: $(VERSION)/' COPYRIGHT $(SED) -i '/Project-Id-Version:/s/:.*/: Converse.js $(VERSION)\n"/' src/i18n/converse.pot @@ -105,14 +100,18 @@ release: make po make dist +release-checkout: + git clone git@github.com:conversejs/converse.js.git --depth 1 --branch $(BRANCH) release-$(BRANCH) + cd release-$(BRANCH) && make dist + .PHONY: publish publish: - git clone git@github.com:conversejs/converse.js.git --depth 1 --branch $(BRANCH) release/ - cd release && make dist && npm pack && npm publish - cd release/src/headless && npm pack && npm publish - find ./release/ -name "converse.js-*.tgz" -exec mv {} . \; - find ./release/src/headless -name "converse-headless-*.tgz" -exec mv {} . \; - rm -rf release + make release-checkout + cd release-$(BRANCH) && npm pack && npm publish + cd release-$(BRANCH)/src/headless && npm pack && npm publish + find ./release-$(BRANCH)/ -name "converse.js-*.tgz" -exec mv {} . \; + find ./release-$(BRANCH)/src/headless -name "converse-headless-*.tgz" -exec mv {} . \; + rm -rf release-$(BRANCH) .PHONY: postrelease postrelease: @@ -157,6 +156,9 @@ devserver: node_modules ######################################################################## ## Builds +dist/converse-no-dependencies.js: src webpack/webpack.common.js webpack/webpack.nodeps.js @converse/headless node_modules + npm run nodeps + dist/converse.js:: node_modules npm run build @@ -201,7 +203,7 @@ src/headless/dist/converse-headless.js: src webpack/webpack.common.js node_modul src/headless/dist/converse-headless.min.js: src webpack/webpack.common.js node_modules @converse/headless npm run headless -dist:: node_modules src/* | dist/website.css dist/website.min.css +dist:: node_modules src/* | dist/website.css dist/website.min.css dist/converse-no-dependencies.js npm run headless npm run build diff --git a/RELEASE.md b/RELEASE.md index 8ae9024ab..1d1b5c26d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,18 +1,18 @@ # Release checklist -1. Check that weblate translations are all merged in +1. Merge weblate translations: https://hosted.weblate.org/projects/conversejs/translations/#repository 2. Run `make check` to check that all tests pass. -3. Run `make release VERSION=10.1.4` +3. Run `make version VERSION=10.1.5` 4. Do a `git diff` to check if things look sane. 5. Do a quick manual test with the `dist` files (via `index.html`) -6. `git commit -am "Release 10.1.4"` -7. `git tag -s v10.1.4 -m "Release 10.1.4"` -8. `git push && git push origin v10.1.4` -9. `make publish BRANCH=v10.1.4` +6. `git commit -am "Release 10.1.5"` +7. `git tag -s v10.1.5 -m "Release 10.1.4"` +8. `git push && git push origin v10.1.5` +9. `make publish BRANCH=v10.1.5` 10. Update release page on Github * Upload tar files 11. Update https://conversejs.org * `cd /home/conversejs/converse.js` - * `make deploy VERSION=10.1.4` + * `make deploy VERSION=10.1.5` 12. Update the repository on weblate -13. Decide on next release number and run `make postrelease VERSION=10.1.5` +13. Decide on next release number and run `make postrelease VERSION=10.1.6`