Skip to content

Instantly share code, notes, and snippets.

@adamsilverstein
Created September 12, 2019 13:09
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 adamsilverstein/e33ea26870e523a5d549456e3e32d22b to your computer and use it in GitHub Desktop.
Save adamsilverstein/e33ea26870e523a5d549456e3e32d22b to your computer and use it in GitHub Desktop.
build.sh (gitlab)
sed -i "s/COMMITHASH/$CI_COMMIT_SHORT_SHA/g" functions.php
functions.php
define( 'MS_RESEARCH_ASSET_VERSION', 'COMMITHASH' );
@adamsilverstein
Copy link
Author

you can replace ‘COMMITHASH’ with time() to make sure development never gets assets cached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment