(→AHPSCRIPTS-82)
|
(→Get Latest Published Change ID)
|
Line 114: | |||
<pre>${bsh:changes=ChangeSetHelper.getChangeSetArray(); if (changes != null && changes.length > 0) { return changes[0].getChangeId(); \} else { return "no revision"; \}}</pre> | <pre>${bsh:changes=ChangeSetHelper.getChangeSetArray(); if (changes != null && changes.length > 0) { return changes[0].getChangeId(); \} else { return "no revision"; \}}</pre> | ||
+ | = Add User Who Requested the Build to the Stamp = | ||
+ | *This script below will output "DEV_anthillLogin" where anthillLogin is the the login name of who requested the build. | ||
+ | ==== AHPSCRIPTS-22 ==== | ||
+ | <pre>import com.urbancode.anthill3.runtime.scripting.helpers.*; | ||
+ | import com.urbancode.anthill3.domain.buildrequest.*; | ||
+ | String name = BuildRequestLookup.getCurrent().getUser().getName(); | ||
+ | String value = "DEV_"+name; | ||
+ | return value;</pre> | ||
= Incrementing Stamp Script Allowing For Manual Input = | = Incrementing Stamp Script Allowing For Manual Input = | ||
*This script depends on a workflow property called "inputversion" where a user can specify a stamp at the time a build is being started. If inputversion is left blank, it uses the project property "my-stamp-property" as the stamp, and increments it. If "inputversion" is not null, and a value is passed, that value is used as the stamp, and becomes the new value of the "my-stamp-property" . | *This script depends on a workflow property called "inputversion" where a user can specify a stamp at the time a build is being started. If inputversion is left blank, it uses the project property "my-stamp-property" as the stamp, and increments it. If "inputversion" is not null, and a value is passed, that value is used as the stamp, and becomes the new value of the "my-stamp-property" . |