-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #492 from primer/release-10.6.0
10.6.0 Release Tracking PR
- Loading branch information
Showing
101 changed files
with
44,230 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
.DS_Store | ||
.sass-cache | ||
node_modules | ||
**/package-lock.json | ||
*.log | ||
build | ||
_site | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
save=true | ||
save-exact=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
## Releasing a new Primer version 🎉 | ||
|
||
|
||
### In `primer/primer`: | ||
|
||
1. Create a new release branch from `dev` and name it `release-<version>`. | ||
|
||
(CI will publish a release candidate version to npm for branches prefixed with `release`. These version numbers have a `rc.<number>` suffix on them) | ||
|
||
2. Go through the tracking issue and make sure everything that should be merged in is merged in. | ||
|
||
3. Once your builds finish, click on the details links for the continuous-integration/travis-ci/push build. Expand the `Deploying application` output and you should be able to find an outputted change log here. Copy this and update the [CHANGELOG.md](https://github.com/primer/primer/blob/master/CHANGELOG.md) file. | ||
|
||
4. Run the version bump in your terminal: `npm run bump`. | ||
|
||
5. Test your changes with the latest release candidate version in the appropriate places (styleguide, storybook, github/github). | ||
|
||
6. Once the release PR is approved and you've done necessary testing, merge to `master`. This will trigger a publish to npm. | ||
|
||
|
||
### In `github/github`: | ||
|
||
1. Create a new branch | ||
|
||
2. Update the primer version in your terminal `npm install primer@<version>`. | ||
|
||
3. Update `stylelint-config-primer` in your terminal to the appropriate version `npm install stylelint-config-primer@latest`. | ||
|
||
4. If you need to make changes to github/github due to the Primer release, make a separate branch. When ready, merge that branch into your release branch. | ||
|
||
5. Add reviewers. | ||
|
||
6. Check that every deleted vendor file has an accompanying updated vendor file and that the version numbers look correct. | ||
|
||
7. Test on review-lab. | ||
|
||
8. When ready, merge! 🎉 | ||
|
||
|
||
## Other items that need to be done after publishing Primer | ||
|
||
#### Update the Style Guide | ||
|
||
1. In [github/styleguide](https://github.com/github/styleguide), update `primer` to your newly released version in your terminal: | ||
|
||
`npm install primer@latest` | ||
|
||
2. Then run: `script/update-primer-docs`. | ||
|
||
3. Commit changes, make PR, get it approved, merge! 🚀 | ||
|
||
#### Update [primer.github.io](primer.github.io) | ||
|
||
1. Edit [index.html](https://github.com/primer/primer.github.io/blob/master/index.html) to include the latest version. | ||
|
||
#### Update Storybook | ||
|
||
1. Pull the latest from master on primer/primer (after merging in release branch). | ||
|
||
2. Run `npm run publish-storybook`. | ||
|
||
#### Publish release tag | ||
|
||
1. Create a new release tag [here](https://github.com/primer/primer/releases/new). | ||
|
||
2. Copy the changes from the [CHANGELOG](https://github.com/primer/primer/blob/master/CHANGELOG.md) and paste it into the release notes. | ||
|
||
3. Publish 🎉 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
const {basename, join, resolve} = require('path') | ||
const PromiseQueue = require('p-queue') | ||
const execa = require('execa') | ||
const globby = require('globby') | ||
const rootDir = resolve(__dirname, '../..') | ||
const lernaConfig = require(join(rootDir, 'lerna.json')) | ||
const modulesDir = join(rootDir, 'modules') | ||
require('console.table') | ||
|
||
const unique = list => Array.from(new Set(list)).sort() | ||
|
||
const matchAll = (pattern, text) => { | ||
const matches = [] | ||
let match | ||
while (match = pattern.exec(text)) { | ||
matches.push(match) | ||
} | ||
return matches | ||
} | ||
|
||
const checks = { | ||
'has stories': (module, key) => { | ||
return globby(join(module.path, '**/stories.js')) | ||
.then(files => ({ | ||
[key]: files.length > 0 ? 'yes' : 'no' | ||
})) | ||
}, | ||
'docs test': (module, key) => { | ||
return execa(join(rootDir, 'script/test-docs'), { | ||
cwd: module.path | ||
}) | ||
.then(result => ({[key]: 'pass'})) | ||
.catch(({stderr}) => { | ||
const pattern = /("\.[-\w]+") is not documented/g | ||
const matches = matchAll(pattern, stderr) | ||
.map(match => match[1]) | ||
let missing = matches ? Array.from(matches) : [] | ||
const max = 5 | ||
if (missing.length > max) { | ||
const more = missing.length - max | ||
missing = missing.slice(0, max).concat(`and ${more} more...`) | ||
} | ||
return { | ||
[key]: 'FAIL', | ||
'missing docs': unique(missing).join(', ') | ||
} | ||
}) | ||
} | ||
} | ||
|
||
const args = process.argv.slice(2) | ||
|
||
const modules = args.length | ||
? Promise.resolve(args) | ||
: globby(join(modulesDir, 'primer-*')) | ||
|
||
modules | ||
.then(moduleDirs => { | ||
console.log('Found %d module directories', moduleDirs.length) | ||
return moduleDirs | ||
.map(path => ({ | ||
path, | ||
name: basename(path), | ||
pkg: require(join(path, 'package.json')) | ||
})) | ||
.filter(({pkg}) => pkg.primer.module_type !== 'meta') | ||
}) | ||
.then(modules => { | ||
console.log('Filtered to %d modules (excluding meta-packages)', modules.length) | ||
|
||
const queue = new PromiseQueue({concurrency: 3}) | ||
|
||
for (const module of modules) { | ||
module.checks = {} | ||
for (const [name, check] of Object.entries(checks)) { | ||
queue.add(() => { | ||
// console.warn(`? check: ${module.name} ${name}`) | ||
return check(module, name) | ||
.then(result => { | ||
Object.assign(module.checks, result) | ||
}) | ||
}) | ||
} | ||
} | ||
|
||
console.warn(`Running ${queue.size} checks...`) | ||
return queue.onIdle().then(() => modules) | ||
}) | ||
.then(modules => { | ||
console.warn('ran tests on %d modules', modules.length) | ||
const rows = modules.map(({name, checks}) => { | ||
return Object.assign({'package': name}, checks) | ||
}) | ||
console.table(rows) | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"private": true, | ||
"name": "primer-scorecard", | ||
"scripts": { | ||
"test": "node index.js" | ||
}, | ||
"devDependencies": { | ||
"console.table": "^0.10.0", | ||
"execa": "^0.10.0", | ||
"globby": "^6.1.0", | ||
"p-queue": "^2.4.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,7 @@ | |
border-radius: 0; | ||
} | ||
|
||
// FIXME deprecate this | ||
.warning { | ||
padding: $em-spacer-5; | ||
margin-bottom: 0.8em; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.