Skip to content

Commit

Permalink
Only update latest tag on stable builds
Browse files Browse the repository at this point in the history
By default, we want users to get a stable version. If they want the
latest updates, they can use the master tag instead.
  • Loading branch information
JaimeLennox authored and aschmolck committed Oct 15, 2018
1 parent f4f4299 commit 9ae1d40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ docker-push:
else \
docker login; \
fi
docker tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:latest
docker tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:$(VERSION)
if [ "$(VERSION)" = "$$(cat version)" ]; then \
docker tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:latest
docker tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:stable; \
docker push smarkets/marge-bot:stable; \
docker push smarkets/marge-bot:latest; \
fi
docker push smarkets/marge-bot:$(VERSION)
docker push smarkets/marge-bot:latest
# for backwards compatibility push to previous location
docker tag smarkets/marge-bot:latest smarketshq/marge-bot:latest
docker tag smarkets/marge-bot:latest smarketshq/marge-bot:$(VERSION)
docker tag smarkets/marge-bot:$$(cat version) smarketshq/marge-bot:latest
docker tag smarkets/marge-bot:$$(cat version) smarketshq/marge-bot:$(VERSION)
docker push smarketshq/marge-bot:$(VERSION)
docker push smarketshq/marge-bot:latest
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ ssh-key: |
```bash
docker run --restart=on-failure \
-v "$(pwd)":/configuration \
smarkets/marge-bot:stable \
smarkets/marge-bot \
--config-file=/configuration/marge-bot-config.yaml
```
Note the use of the stable tag, which will use the latest released version.
Without this, by default docker will use the `latest` tag, which corresponds to
the HEAD commit of the `master` branch. Feel free to use this instead (or the
`master` tag, to be more precise) if you want the latest updates, at the risk
of possible bugs.
By default docker will use the `latest` tag, which corresponds to the latest
stable version. You can also use the `stable` tag to make this more explicit.
If you want a development version, you can use the `master` tag to obtain an
image built from the HEAD commit of the `master` branch. Note that this image
may contain bugs.
You can also specify a particular version as a tag, e.g.
`smarkets/marge-bot:0.7.0`.
Expand Down

0 comments on commit 9ae1d40

Please sign in to comment.