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 378
Add release.sh: automated releases! #1308
Open
whyvez
wants to merge
11
commits into
publisher-production
Choose a base branch
from
update-release-docs
base: publisher-production
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
de118ac
Add release.sh: automated releases!
e56aa5d
Update release.sh: change docs gen logic
f25a16c
Update release.sh/RELEASE.md: npm publish
53b2369
Update RELEASE.md/release.sh: update order
81aee23
Update RELEASE.md: clarify
67204f3
Update RELEASE.md
ffd70af
Update RELEASE.md
baaff64
Update RELEASE.md
008cfc2
Update RELEASE.md
11607c8
Update RELEASE.md
b21e346
Update RELEASE.md
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,22 @@ | ||
| # Creating a release of mapbox.js | ||
|
|
||
| ### Before Deploying | ||
|
|
||
| * 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` | ||
|
whyvez marked this conversation as resolved.
Outdated
|
||
This file contains hidden or 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 hidden or 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 | ||
|
whyvez marked this conversation as resolved.
Outdated
|
||
| fi | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.