-
-
Notifications
You must be signed in to change notification settings - Fork 25
Update exe only if our version is newer #41
base: master
Are you sure you want to change the base?
Conversation
b01ad40
to
ce790c6
Compare
@oleg-nenashev Could you offer me some suggestions to deal with the warnings by SpotBugs? |
Sorry, I missed that due to all other items on my plate. I will help to finish/integrate it as a part of the release for WinSW 2.7.0 |
FTR
Both issues should be fixed by switching to a copy-on-write array. Also it might be preferable to just use the |
1e020aa
to
fb27ee7
Compare
OK, OK, I got it. This passes: private static class Absolutize extends SlaveToMasterFileCallable<String> {
private static final long serialVersionUID = 1L;
public String invoke(File f, VirtualChannel channel) throws IOException {
return f.getAbsolutePath();
}
} agentExe.act(new Absolutize()); This doesn't: agentExe.act(new SlaveToMasterFileCallable<String>() {
private static final long serialVersionUID = 1L;
public String invoke(File f, VirtualChannel channel) throws IOException {
return f.getAbsolutePath();
}
}); Damn good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code should do its job. Two implementation notes:
-
There is a
VersionNumber
class which could help with version comparison -
It is possible to automate provisioning of the version through a filtered resource.
- https://github.com/jenkinsci/jenkinsfile-runner/blob/master/bootstrap/pom.xml#L38-L54
- https://github.com/jenkinsci/jenkinsfile-runner/blob/master/bootstrap/src/main/resources-filtered/jfr.properties
- https://github.com/jenkinsci/jenkinsfile-runner/blob/d4143a979118edbafca135c3433a427554689c6d/bootstrap/src/main/java/io/jenkins/jenkinsfile/runner/bootstrap/Util.java#L48-L55
Both can be done later, it is more important to actually ship the change
It'd be better if there is a constructor that accepts integers rather than strings.
Will do. |
@oleg-nenashev could you review & merge please? I would like to https://github.com/jenkinsci/jep/blob/master/jep/230/README.adoc#specification but I am blocked by the presence of nontrivial unmerged PRs. |
In my queue, sorry |
Fixes winsw/winsw#399