Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions DEPLOYING.md

This file was deleted.

22 changes: 22 additions & 0 deletions RELEASE.md
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>`
Comment thread
whyvez marked this conversation as resolved.
Outdated
* 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`
Comment thread
whyvez marked this conversation as resolved.
Outdated
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"scripts": {
"test": "eslint src && phantomjs node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html",
"prepublishOnly": "npm run build",
"build": "make"
"build": "make",
"release": "./release.sh"
},
"license": "BSD-3-Clause",
"devDependencies": {
Expand Down
54 changes: 54 additions & 0 deletions release.sh
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
Comment thread
whyvez marked this conversation as resolved.
Outdated
fi