When a new version of SPF needs to be released, follow these steps. You will need admin privileges for the youtube/spfjs repo. This document will use "vX.Y.Z" to refer to the new version, where "vX.Y.Z" is a valid semantic version.
-
Ensure all code has been tested. Verify changes from the previous version manually and make sure all unit tests pass.
-
Run
bin/version.sh <new-version>|major|minor|patch
either replacing<new-version>
with a valid semantic version or specifying one ofmajor
,minor
, orpatch
to increment the version accordingly. This:- switches to a new branch
- updates the
version
property in thepackage.json
file - commits the change, titling it "Mark vX.Y.Z for release"
- updates the documenation using
bin/gendocs.sh
. This: - commits the change, titling it "Update documentatation for vX.Y.Z"
-
Send a pull request with the two commits.
-
Merge the pull request containing the two commits.
-
In a clone of the repo (not of a fork), run
git log
to locate the hash of the merge commit. -
Run
bin/release.sh <commit-hash>
, replacing<commit-hash>
with the hash of the merge commit. This:- switches to a temporary working branch
- builds the release files under the
dist/
folder - commits the change, titling and tagging it as "vX.Y.Z"
- pushes the tag to the GitHub repo, which allows the built release output to be accessible via the tagged commit but not the master branch
- returns to the original branch
-
Run
bin/distribute.sh <vX.Y.Z>
. This:- switches to a temporary working branch
- creates a distribution ZIP archive of the built release
files at
build/spfjs-X.Y.Z-dist.zip
- pushes the updated source and release files for the npm package
- returns to the original branch
-
If you have ownership of the npm spfjs package, the
bin/distribute.sh
script will automatically push the update in the previous step. If not, request a push by emailing one of the owners listed by runningnpm owner ls
with the subject "npm Update Request: SPF vX.Y.Z". -
Request an update to the Google Hosted Libraries CDN. Email [email protected] with the subject "Hosted Libraries CDN Update Request: SPF vX.Y.Z".
-
Go to the GitHub Tags page and click "Add release notes" next to the new version.
-
Title the release "SPF XY (X.Y.Z)". You can run
bin/name.js
to generate a title to copy/paste. -
Write the release notes, highlighting new features or fixed bugs. Auto-link to issues using the
#NUM
syntax. -
Attach the distribution ZIP archive
spfjs-X.Y.Z-dist.zip
. -
Publish the release.
-
Push the website.
-
Post from the @spfjs Twitter account announcing the new version and linking to the GitHub release page and the Download page.
-
Send an email to [email protected] announcing the new version, summarizing the release notes, and linking to the GitHub release page and the Download page.