Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ jobs:
VERSION="${{ steps.version.outputs.VERSION }}"
YEAR=$(date +'%Y')

# Force the runtime VERSION literal to the tag. Single source of
# truth is the git tag (same as the copyright header below).
# release-please's x-release-please-version annotation keeps the
# committed source in sync; this is the belt-and-suspenders so the
# SHIPPED bundle can never drift from the tag even if that slips
# (which is exactly how v2.1.0 went out logging "2.0.2").
sed -i -E "s/(static VERSION *= *['\"])[0-9]+\.[0-9]+\.[0-9]+(['\"])/\1${VERSION}\2/" kyte-source.js
STAMPED=$(grep -oE "static VERSION *= *['\"][0-9.]+['\"]" kyte-source.js)
echo "Stamped: ${STAMPED}"
if ! echo "${STAMPED}" | grep -q "'${VERSION}'"; then
echo "::error::Failed to stamp VERSION literal to ${VERSION} (got: ${STAMPED})."
exit 1
fi

# Two builds:
# kyte.js — minified, with `//# sourceMappingURL=kyte.js.map`
# appended by terser; pairs with kyte.js.map for
Expand Down
7 changes: 5 additions & 2 deletions kyte-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
* ©2020-2023 KeyQ, Inc.
**/
class Kyte {
/** KyteJS Version # */
static VERSION = '2.0.2';
/** KyteJS Version # — kept in sync with the release by release-please
* (x-release-please-version annotation; see release-please-config.json
* extra-files). The deploy workflow also force-stamps this from the git
* tag at build time as a belt-and-suspenders. */
static VERSION = '2.1.0'; // x-release-please-version
/** **************** */

/**
Expand Down
3 changes: 3 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"package-name": "kyte-api-js",
"include-component-in-tag": false,
"include-v-in-tag": true,
"extra-files": [
{ "type": "generic", "path": "kyte-source.js" }
],
"changelog-sections": [
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
Expand Down
Loading