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
################################## INSTRUCTIONS ################################## | |
# 1. Make sure docker-machine is installed on your machine # | |
# 2. Download the file # | |
# 3. Run using $ . swarm-with-docker-machine.sh so that DOCKER_HOST is exported # | |
################################################################################## | |
# Remove any existing machines | |
docker-machine rm -y manager agent1 agent2 | |
# Create machines |
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
#!/bin/bash | |
######################################################################## | |
################################ README ################################ | |
######################################################################## | |
# | |
# This script is here to allow the use of "git push prod v1.2.3" commands or similar. | |
# | |
# Push a tag to a bare repository having this file as pre-receive hook, | |
# and you'll be able to deploy directly from command line in your local environment, |
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
#!/bin/sh | |
# .git/hooks/commit-msg | |
test "" != "$(egrep '[A-Z]{3,}-\d+' "$1")" || { | |
echo >&2 Commit message requires JIRA code. | |
exit 1 | |
} |
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
#!/bin/sh | |
get_clean_message() { | |
egrep -o '^[^#].*' "$1" | |
} | |
# Do not allow empty messages after removing comments | |
[ -z "$(get_clean_message "$1")" ] && { | |
echo >&2 Commit message can NOT be empty. | |
exit 1 |