Skip to content

Commit f2f9a49

Browse files
committed
now can set full path to copy file
1 parent 96c1997 commit f2f9a49

File tree

1 file changed

+11
-4
lines changed
  • src/main/java/org/scm4j/deployer/installers

1 file changed

+11
-4
lines changed

src/main/java/org/scm4j/deployer/installers/Copy.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,22 @@ public DeploymentResult start() {
6565

6666
@Override
6767
public void init(IDeploymentContext depCtx) {
68-
if (folderName != null)
69-
outputFile = new File(depCtx.getDeploymentPath(), folderName);
70-
else
71-
outputFile = new File(depCtx.getDeploymentPath());
68+
if (outputFile == null) {
69+
if (folderName != null)
70+
outputFile = new File(depCtx.getDeploymentPath(), folderName);
71+
else
72+
outputFile = new File(depCtx.getDeploymentPath());
73+
}
7274
filesForDeploy = depCtx.getArtifacts().values();
7375
}
7476

7577
public Copy setDefaultFolderName(String folderName) {
7678
this.folderName = folderName;
7779
return this;
7880
}
81+
82+
public Copy setFullPathToOutputFile(String fullPath) {
83+
this.outputFile = new File(fullPath);
84+
return this;
85+
}
7986
}

0 commit comments

Comments
 (0)