This is the procedure for making a new release of Linguist. The entire process needs to be performed by a member of GitHub staff.
-
Create a branch for the release:
git checkout -b release-vxx.xx.xx
-
Make sure your local dependencies are up to date:
rm Gemfile.lock && script/bootstrap
-
If the grammar submodules have not been updated recently, update them:
git submodule update --remote
. If any submodules are updated:- update the
grammars.yml
:script/grammar-compiler update -f
- confirm the updated grammars still compile and no new errors have been introduced and none have gone missing:
bundle exec rake check_grammars
- verify and fix any problems identified above
- commit all changes:
git commit -a
- update the license cache:
bundle exec licensed cache -c vendor/licenses/config.yml
- double check no license problems found:
bundle exec licensed status -c vendor/licenses/config.yml
- verify and fix any problems identified above
- commit all changes:
git commit -a
- update the
-
Ensure that samples are updated:
bundle exec rake samples
-
Ensure that tests are green:
bundle exec rake test
-
Build a test gem
GEM_VERSION=$(git describe --tags 2>/dev/null | sed 's/-/./g' | sed 's/v//') bundle exec rake build_gem
-
Test the test gem:
- Bump the Gemfile and Gemfile.lock versions for an app which relies on this gem
- Install the new gem locally
- Test behavior locally, branch deploy, whatever needs to happen
-
Bump gem version in
lib/linguist/VERSION
, like this. -
Make a PR to
github/linguist
, like this. -
Build a local gem:
bundle exec rake build_gem
-
Merge the
github/linguist
PR -
Tag and push:
git tag vx.xx.xx; git push --tags
-
Create a GitHub release with the pushed tag (https://github.com/github/linguist/releases/new) and populate it using the "Generate release notes" button.
-
Build a grammars tarball (
./script/build-grammars-tarball
) and attach it to the GitHub release -
Push to rubygems.pkg.github.com --
gem push --key github --host https://rubygems.pkg.github.com/github github-linguist-3.0.0.gem
. See Working with the RubyGems registry for more details. -
Push to rubygems.org --
gem push github-linguist-3.0.0.gem
-
Update and deploy the following repositories to use the new gem in production:
github/github
- if backporting, label for backporting to the latest version of GitHub Enterprise Server only.github/treelights
- this only needs the Linguist version updated to pull the compiled grammars from the Linguist release. If backporting, label for backporting to the latest version of GitHub Enterprise Server only.
Note: syntax highlighting changes won't take effect until the updated
github/treelights
repo has been deployed.