It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to embed revision or release number within a file? Edited

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

1 answer

0 votes
bgannin Atlassian Team May 26, 2017

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,935 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you