As you may know, browsers will cache the old JS and CSS files, instead of updating them, as we upload our new version of the project into the server. This leads to errors on the client-side, forcing them to hard-refresh the browser.
A way to overcome this problem is for instance adding ?[version] at the end of the file as we call it:
<script type="text/javascript" src="myfile.js?1500"></script>
Is there a way to do it automatically with SourceTree, after a commit or a tag realease? For example:
<script type="text/javascript" src="myfile.js?$$REVISION$$"></script>
Thank you in advance
There isn't something specifically like this in SourceTree and I don't know when there will be (although voting for a ticket on replacement values is a good idea, or filing if there's not one)
That said, you should be able to accomplish something like this using pre or post commit hooks in git.
Cheers,
Brian Ganninger
Senior Mac Developer, SourceTree
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.