-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
21 additions
and
33 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
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,3 +1,6 @@ | ||
# Releasing | ||
|
||
Releasing of the `@percy/agent` package is handled automatically with the [semantic-release](https://github.com/semantic-release/semantic-release) package. | ||
- Bump the version in package.json and commit the change | ||
- Create a git tag for the new version | ||
- Push the commit and tag to GitHub | ||
- CircleCI will publish new versions of the package |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# This script is responsible for shipping the `percy` shadow package. | ||
# Set the npm registry auth token | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
|
||
# Grab the local version and check to see if that version exists on npm | ||
agentAlreadyReleased=$(npm view @percy/agent versions | grep $(node -p "require('./package.json').version")) | ||
|
||
# If the package with that version has not yet been released, go ahead and release it. | ||
if [ !$agentAlreadyReleased ]; then | ||
npm publish | ||
else | ||
echo "Skipping @percy/agent publishing because the desired version has already been published." | ||
fi | ||
|
||
# Ship the `percy` shadow package | ||
# https://www.npmjs.com/package/percy | ||
# | ||
# Release of the `@percy/agent` package is handled with semantic-release | ||
|
||
# First we jam `percy` into the package name | ||
sed -i 's/@percy\/agent/percy/g' package.json | ||
|
||
# Next we grab the local version and check to see if that version exists on npm | ||
packageAlreadyReleased=$(npm view percy versions | grep $(node -p "require('./package.json').version")) | ||
percyAlreadyReleased=$(npm view percy versions | grep $(node -p "require('./package.json').version")) | ||
|
||
# If the package with that version has not yet been released, go ahead and release it. | ||
if [ !$packageAlreadyReleased ]; then | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
if [ !$percyAlreadyReleased ]; then | ||
npm publish | ||
else | ||
echo "Skipping percy package publishing because the desired version has already been published." | ||
echo "Skipping percy publishing because the desired version has already been published." | ||
fi |