Copyright © 2017 - The University of Melbourne
The contents of this repository have been produced by The University of Melbourne for internal use and must not be distributed without the express permission of The University of Melbourne.
The design system requires Ruby v2.3.3, Node.js v6.9.3, and the latest version of yarn. To set it up, run:
git clone https://github.com/unimelb/unimelb-design-system.git
cd unimelb-design-system
cp .env.example .env
bundle install
yarn
- Run
foreman start
oryarn start
- Visit http://localhost:7001/
To build the assets for production (e.g. for debugging purposes), run yarn run build
. The compiled targets can be found in the /build
directory.
Supported browsers:
- last two versions of Chrome, Firefox and Edge
- IE 9, 10 and 11
- Safari 8+
- iOS 8.4+
- Android 4.4+
- Firefox ESR (v52.x)
Recommended mobile devices for testing:
- iPhone 4S
- iPhone 6
- iPad 2
- Galaxy s5
- Find or create an issue on GitHub.
- Create a new branch from master, making sure to give it a useful and concise name (e.g.
feat-inline-form
,fix-styled-select-ie
,refactor-short-header
, etc.) - Commit your changes to this new branch.
- Test your changes across browsers and devices.
- Open a pull request with a concise message and detailed description, making sure to reference any issue/s that can be automatically closed when the PR is merged (e.g.
Fix #<issue-number>
). If the PR is still a work in progress, assign thepr-wip
tag to it. - Assign the
pr-patch
,pr-minor
orpr-major
tag to the PR to identify the semver level of the change (patch = bug fix, minor = new feature, major = breaking change). - Decide whether to merge the PR now or wait for a later release. For instance, you may not want to merge a breaking change (
pr-major
) right away in case a critical bug fix comes up. - When ready, merge the PR and assign the
next-release
milestone to it. If the PR resolves any issues, assign the milestone to them too. - Delete your local branch, as well as the remote branch.
- Once there are enough changes for a release, identify the highest semver level (e.g.
pr-major
) assigned to the PRs in thenext-release
milestone, and deduce the version number for the release - e.g. if the latest release wasv6.0.1
and at least one PR has tagpr-minor
, the next release will bev6.1
. - Create a new milestone and release draft. Name both after the chosen version number (e.g.
v6.1
). For major versions, you may want to start with a release candidate (RC): in the release draft, just tick the "pre-release" box and add-rc1
to the name of the tag (e.g.v7.0-rc1
). - Take a look at the list of all issues and PRs in the
next-release
milestone, then, for each PR and associated issues, document the changes in the release notes and reassign the PR and issues to the new milestone (e.g.v6.1
). At the end of this process, thenext-release
milestone should no longer be assigned to any PR/issue and the release notes should be complete. Don't publish the release notes yet.
- Update the version number in
package.json
and commit the change straight tomaster
. - Update the
VERSION
environment variable in the.env
file and in Semaphore. For release candidates, use the version number without the-rc
suffix so early adopters don't have to update their design system version twice. - Perform a manual deployment in Semaphore: navigate to the latest build of the
master
branch and select Deploy manually. - Check that the new version is live at
https://d2h9b02ioca40d.cloudfront.net/<version-number>/uom.<js|css>
.
- After deploying the new version, run
RACK_ENV=dev MODE=prod rackup -p 7000
locally. - Test the documentation site at http://localhost:7000. You can check all components at once at http://localhost:7000/components/all. Fix any issues and redeploy if needed.
- If you haven't already done so, clone the static-capture project.
- Find your IP address.
- From the root of the
static-capture
directory, runrake capture source=http://<ip-address>:7000
. - Rename the newly created folder with the version number (e.g.
v6.1
). - Copy the favicons as well as
robots.txt
from the design system'spublic
folder into this new folder. - Zip the folder and drag-and-drop it to Netlify, on the Deploy page of the web-unimelb site.
- Check the live site at https://web.unimelb.edu.au.
- Grab the deployment URL of the previous version of the documentation site on Netlify, and provide it in the release notes of that version on GitHub.
- Publish the release notes of the new version.
- In the case of a release candidate, liaise with early adopters internally to deploy and test the new version on a limited number of sites. If this testing phase reveals any issues: fix them, perform a manual deployment in Semaphore, deploy the documentation site again if needed, test thoroughly, and re-publish the same release notes but with the release candidate number incremented (e.g.
v7.0-rc2
). Make sure to keep assigning issues and pull requests to the version's milestone and to keep documenting the changes in the release notes if relevant. Once the release candidate is considered stable, in the release notes, remove the-rc
prefix from the tag name, untick the "pre-release" box and hit Publish. - Close the version's milestone in GitHub.
- Announce the release in the
#general
Slack channel.
- Create a local branch off the most recent legacy tag - e.g.
git checkout tags/v5.0.1 -b fix-something-in-injection
- Recreate
.env
from.env.example
and setCDNURL
to"https://d2h9b02ioca40d.cloudfront.net/shared"
- Fix whatever you need to fix in the injection and commit the changes to your local branch (don't push them).
- Run
NODE_ENV=production yarn run build
to compile the targets. - Copy the compiled injection files in the
build
folder to slingshot. - In slingshot, inside
src/templates
, duplicate the latest version's folder and rename it to, for instance,v5.0.2
. - Run
bundle exec rake slingshot:compile
, then start a local web server and test your changes. - Commit your changes, then go back to the design system.
- Create a tag from your branch and push it - e.g.
git tag v5.0.2
, thengit push origin v5.0.2
. - Delete your local branch - e.g.
git branch -D fix-something-in-injection
.