mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
making this public due to a popular demand, such as http://www.nabble.com/changing-build-number-while-hudson-is-running-tt16121427.html
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7872 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
42f19e5fc8
commit
99953d7e31
2 files changed
+30
-1
No files matched your search
@@ -247,7 +247,18 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
return modules;
|
||||
}
|
||||
|
||||
/*package*/ void updateNextBuildNumber(int next) throws IOException {
|
||||
/**
|
||||
* Programatically updates the next build number.
|
||||
*
|
||||
* <p>
|
||||
* Much of Hudson assumes that the build number is unique and monotonic,
|
||||
* so this method can only accept a new value that's bigger than
|
||||
* {@link #getNextBuildNumber()} returns. Otherwise it'll be no-op.
|
||||
*
|
||||
* @since 1.199
|
||||
* (before that, this method was package private.)
|
||||
*/
|
||||
public void updateNextBuildNumber(int next) throws IOException {
|
||||
if(next>nextBuildNumber) {
|
||||
this.nextBuildNumber = next;
|
||||
saveNextBuildNumber();
|
||||
|
||||
@@ -201,6 +201,24 @@ public abstract class Job<JobT extends Job<JobT,RunT>, RunT extends Run<JobT,Run
|
||||
return nextBuildNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Programatically updates the next build number.
|
||||
*
|
||||
* <p>
|
||||
* Much of Hudson assumes that the build number is unique and monotonic,
|
||||
* so this method can only accept a new value that's bigger than
|
||||
* {@link #getNextBuildNumber()} returns. Otherwise it'll be no-op.
|
||||
*
|
||||
* @since 1.199
|
||||
* (before that, this method was package private.)
|
||||
*/
|
||||
public void updateNextBuildNumber(int next) throws IOException {
|
||||
if(next>nextBuildNumber) {
|
||||
this.nextBuildNumber = next;
|
||||
saveNextBuildNumber();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the log rotator for this job, or null if none.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user