Skip to content

Instantly share code, notes, and snippets.

@gboone
Last active May 11, 2017 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gboone/7cb9934a659a7b1dcd6d0d371d81d1e0 to your computer and use it in GitHub Desktop.
Save gboone/7cb9934a659a7b1dcd6d0d371d81d1e0 to your computer and use it in GitHub Desktop.
Copy Federalist preview URL on commit
#!/bin/sh
#
# A commit-msg hook to copy the federalist preview url to your clipboard after you commit.
# Note: The URL will not work until the preview site has actually generated, that doesn't happen until you `push`
#
NAME=$(git branch | grep '*' | sed 's/* //')
echo "Your federalist preview will be at https://federalist.18f.gov/preview/18F/18f.gsa.gov/$NAME/"
echo "https://federalist.fr.cloud.gov/preview/18F/18f.gsa.gov/$NAME/" | pbcopy
echo "This url has been copied to your clipboard."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment