Skip to content

Commit cd4f585

Browse files
committed
Update release guide with git flow steps, update Travis deployment to use git tag
1 parent c07a70a commit cd4f585

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ deploy:
3838
skip_cleanup: true
3939
on:
4040
branch: release
41+
tags: true
4142
- provider: script
4243
script: ./deploy_staging.sh
4344
skip_cleanup: true

deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ set -e
44

55
docker-compose build --no-cache
66
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
7-
docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_COMMIT
7+
docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_TAG
88
docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
9-
docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_COMMIT
9+
docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_TAG
1010
docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
1111

1212
echo $GCLOUD_SERVICE_KEY_PRD | base64 --decode -i > ${HOME}/gcloud-service-key.json

developer_docs/development.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ A guide for adding code to this project.
1515
Follow the [installation guide](./installation.md).
1616

1717
## Development Workflow
18-
This project uses git-flow. For an in-depth overview of git-flow, read ["A successful Git branching model"](https://nvie.com/posts/a-successful-git-branching-model/). As a person contributing code but not creating production releases (this is most people!), here's what you need to know:
18+
* This project uses git-flow. For an in-depth overview of git-flow, read ["A successful Git branching model"](https://nvie.com/posts/a-successful-git-branching-model/).
19+
* [Let's stop saying Master/Slave](https://medium.com/@mikebroberts/let-s-stop-saying-master-slave-10f1d1bf34df)
20+
21+
As a person contributing code but not creating production releases (this is most people!), here's what you need to know:
1922
* The default branch is `develop`. All pull requests should be made to this branch. It should be stable, and all commits are visible at a staging sever.
2023
* When working on a bug or feature, you should branch from the `develop` branch. When you're done, you should open a pull request from your feature branch to `develop`.
2124
* The `release` branch is the live production branch, and is the code deployed to editor.p5js.org. Changes to this branch should be made carefully, and will be done using git tags.

developer_docs/release.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,18 @@ This project release guide is based on
77
* [git-flow](https://nvie.com/posts/a-successful-git-branching-model/)
88
* [Semantic Versioning (semver)](https://semver.org/)
99
* [npm-version](https://docs.npmjs.com/cli/version)
10+
* [Let's stop saying Master/Slave](https://medium.com/@mikebroberts/let-s-stop-saying-master-slave-10f1d1bf34df)
1011

1112
## Steps
13+
1. `$ git checkout develop`
14+
2. `$ git checkout -b release-<newversion>`
15+
3. Do all of the release branch testing necessary. This could be as simple as running `npm test:ci`, or it could take user testing over a few days.
16+
4. `$ git checkout release`
17+
5. `$ git merge --no-ff release-<newversion>`
18+
6. `$ npm version <newversion>` (see [npm-version](https://docs.npmjs.com/cli/version) for valid values of <newversion>).
19+
7. `$ git push && git push --tags`
20+
8. `$ git checkout develop`
21+
9. `$ git merge --no-ff release-<newversion>`
22+
23+
Travis CI will automatically deploy the release to production, as well as push a production tagged Docker image to DockerHub.
24+

0 commit comments

Comments
 (0)