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 | |
# This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch. | |
# There are six variants that I have built: | |
# - pre-commit: stops commits to master/main/develop branches. | |
# - pre-commit-2: also includes a core.whitespace check. | |
# - pre-commit-3: the core.whitespace check and an EOF-newline-check. | |
# - pre-commit-4: only the core.whitespace check. | |
# - pre-commit-5: elixir formatting check. | |
# - pre-commit-6: prettier formatting check. | |
# Set the desired version like this before proceeding: |
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
# deploy under "path" context path | |
curl --upload-file appplication-0.1-1.war "http://tomcat:tomcat@localhost:8080/manager/deploy?path=/application-0.1-1 | |
# undeploy | |
curl "http://tomcat:tomcat@localhost:8080/manager/undeploy?path=/application-0.1-1" | |
# ! tomcat7 uses /manager/text/undeploy and /manager/text/deploy paths | |
# tomcat6-admin (debian) or tomcat6-admin-webapps (rhel) has to be installed | |
# tomcat-users.xml has to be setup with user that has admin, manager and manager-script roles |
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
git push origin :refs/tags/<tagname> // Delete tag from remote | |
git tag -fa <tagname> // Reset tag to current commit | |
git push origin master --tags // Push tag to remote |