This repository was archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Yves Richard
committed
Oct 17, 2019
1 parent
157fc7d
commit 9d64a4c
Showing
4 changed files
with
76 additions
and
41 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Creating a release of mapbox.js | ||
|
||
* You need to have the AWS CLI installed. `pip install awscli` | ||
* Write a `CHANGELOG.md` entry that describes your changes and links to | ||
issues in question | ||
|
||
### Automated Deployement: | ||
|
||
`npm run release <major.minor.patch>` | ||
|
||
### Manual Deployement: | ||
|
||
* Update `_config.yaml`, `_config.publisher-production.yml`, `_config.publisher-staging.yml` | ||
* Build docs. `./deploy.sh v<major.minor.patch>` | ||
* Commit docs. | ||
* Bump version and tag. `npm version <major.minor.patch>` | ||
* Push to Github. `git push origin publisher-production --tags` | ||
* Build `mapbox.js` `make` | ||
* Publish to CDN. `./deploy.sh v<major.minor.patch>` | ||
* Publish to NPM. `mbx npm 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
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,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
version="$1" | ||
tag="v${version}" | ||
|
||
if [[ -z $version ]]; then | ||
echo "First order argument of version required. i.e. ./bump 3.2.0" | ||
fi | ||
|
||
if [[ $(git status --porcelain) ]]; then | ||
echo "You cannot have any local changes to run release. Stash or commmit and rerun." | ||
exit 1 | ||
fi | ||
|
||
echo "Have you updated and commited the CHANGELOG? (y/n)" | ||
read -r changelog_updated | ||
|
||
if [[ "$changelog_updated" != "y" ]]; then | ||
echo "Update the changelog and commit then run release again." | ||
exit 1 | ||
fi | ||
|
||
echo "Bumping version in publishers _config files" | ||
find . -name '_config*.yml' -exec sed -i '' "s/^\\(\\s*mapboxjs\\s*:\\s*\\).*/\\1 ${version}/" {} \; | ||
|
||
echo "Commiting publishers _config files" | ||
git add _config*.yml | ||
git commit -m "Update _config*.yml: ${tag}" | ||
|
||
echo "Building docs" | ||
./_docs/build.sh "$tag" | ||
git add docs/* | ||
git commit -m "Update docs: ${tag}" | ||
|
||
echo "Bumping version in package.json and package-lock.json, commiting and tagging" | ||
npm version "$version" | ||
git push origin publisher-production --tags | ||
|
||
echo "Do you want to publish to our CDN? (y/n)" | ||
read -r should_publish_cdn | ||
|
||
if [[ "$should_publish_cdn" == "y" ]]; then | ||
make | ||
./deploy.sh "$tag" | ||
fi | ||
|
||
echo "Do you want to publish NPM? (y/n)" | ||
read -r should_publish_npm | ||
|
||
if [[ "$should_publish_npm" == "y" ]]; then | ||
mbx npm publish | ||
fi |