Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Last active January 20, 2023 09:03
Show Gist options
  • Save coreymcmahon/71c7d2493a8e14d78b1a772f453417c5 to your computer and use it in GitHub Desktop.
Save coreymcmahon/71c7d2493a8e14d78b1a772f453417c5 to your computer and use it in GitHub Desktop.
Envoyer - write Git hash to a file (public/version.html)
###
# Useful when constructing a "version number" for display in the application
cd {{ release }}
echo {{ sha }} | cut -c -8 > ./public/version.html
date -u +"%Y-%m-%d %T" >> ./public/version.html
###
# public/version.html will contain:
#
# fad315b1
# 2023-01-18 02:46:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment