Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Versioning and Backwards Compatibility #48

Merged
merged 5 commits into from
Apr 18, 2020
Merged

Conversation

seshrs
Copy link
Member

@seshrs seshrs commented Apr 13, 2020

This PR updates the structure of the Primer Spec site to host released binaries for all minor versions, starting with version 1.2. This change will provide backwards compatibility for specs that were generated using an older version of Primer Spec (for instance, archived versions of specs from past semesters).

To enable this backwards compatibility, the following changes needed to be made:

  • The assets directory for this site now contains a directory for CSS and JS files for each minor version.
  • The webpack config outputs to the correct assets/ location.
  • The files _layouts/spec.html and _includes/spec_before_main_content.html reference the current version's assets. This ensures that when a site is built with Primer Spec, it will always download that particular version's assets.
  • script/version makes it easy to bump the version as required. Major and minor version bumps also require changes to the above files, so this script automates that.
  • The release process documentation notes how to use script/version.

Before the next release freeze, I will test this change with actual GitHub Pages sites.

@awdeorio: If you have a chance, I'd definitely appreciate a second pair of eyes on my updates to the documentation (especially CONTRIBUING.md). 😃

Starting with v1.2, every minor version's assets will be hosted in a separate directory (so that specs that use older versions of Primer Spec will still render correctly).
The script not only updates the VERSION file, but also creates new directories in the assets/ if appropriate, and updates _layouts/spec.html to use these new directories.
@seshrs seshrs added the semver/minor Pull Request proposes "minor" change label Apr 13, 2020
@seshrs seshrs added this to the SP/SU 2020 milestone Apr 13, 2020
@seshrs seshrs requested a review from awdeorio April 13, 2020 03:49
@seshrs seshrs merged commit 51c2912 into develop Apr 18, 2020
@seshrs seshrs deleted the versioning branch April 18, 2020 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/minor Pull Request proposes "minor" change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant