-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into external-MR
- Loading branch information
Showing
46 changed files
with
2,181 additions
and
602 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,6 +3,8 @@ ENV/ | |
.cache | ||
*.egg-info | ||
.coverage | ||
.pytest_cache | ||
|
||
# nix stuff | ||
result | ||
result-* |
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
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 |
---|---|---|
@@ -1,34 +1,50 @@ | ||
requirements_frozen.txt requirements.nix requirements_override.nix: requirements.txt | ||
pypi2nix -V 3.6 -r $^ | ||
VERSION?=$$(git rev-parse --abbrev-ref HEAD) | ||
|
||
.PHONY: all | ||
all: requirements_frozen.txt requirements.nix requirements_override.nix default.nix | ||
nix-build -K . | ||
all: requirements_frozen.txt requirements.nix requirements_override.nix marge-bot dockerize | ||
|
||
.PHONY: marge-bot | ||
marge-bot: | ||
nix-build --keep-failed --attr marge-bot default.nix | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf .cache result requirements_frozen.txt | ||
rm -rf .cache result result-* requirements_frozen.txt | ||
|
||
.PHONY: bump | ||
bump: bump-requirements bump-sources | ||
|
||
.PHONY: bump-sources | ||
bump-sources: | ||
nix-shell --run niv update | ||
|
||
.PHONY: bump-requirements | ||
bump-requirements: clean requirements_frozen.txt | ||
|
||
.PHONY: dockerize | ||
dockerize: dockerize.nix | ||
docker load --input $$(nix-build dockerize.nix) | ||
requirements_frozen.txt requirements.nix requirements_override.nix: requirements.txt | ||
pypi2nix -V 3.6 -r $^ | ||
|
||
.PHONY: dockerize | ||
dockerize: | ||
docker load --input $$(nix-build --attr docker-image default.nix) | ||
|
||
.PHONY: docker-push | ||
docker-push: | ||
if [ -n "$$DOCKER_USERNAME" -a -n "$$DOCKER_PASSWORD" ]; then \ | ||
docker login -u "$${DOCKER_USERNAME}" -p "$${DOCKER_PASSWORD}"; \ | ||
docker login -u "$${DOCKER_USERNAME}" -p "$${DOCKER_PASSWORD}"; \ | ||
else \ | ||
docker login; \ | ||
docker login; \ | ||
fi | ||
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 tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:latest | ||
docker push smarkets/marge-bot:$$(cat version) | ||
docker push smarkets/marge-bot:latest | ||
docker push smarkets/marge-bot:$(VERSION) | ||
# 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:$$(cat version) | ||
docker push smarketshq/marge-bot:$$(cat 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 |
Oops, something went wrong.