Skip to content

Commit

Permalink
fix(core): Generate filename for formula from packager config (#975)
Browse files Browse the repository at this point in the history
  • Loading branch information
roulpriya committed Oct 13, 2022
1 parent e966121 commit 0810947
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import static org.jreleaser.util.StringUtils.isBlank;
import static org.jreleaser.util.StringUtils.isNotBlank;
import static org.jreleaser.util.StringUtils.isTrue;
import static org.jreleaser.util.StringUtils.getHyphenatedName;

/**
* @author Andres Almiray
Expand Down Expand Up @@ -235,7 +236,8 @@ protected void writeFile(Project project,
} else {
if (CASK_RB.equals(fileName) || FORMULA_MULTI_RB.equals(fileName)) return;
Path outputFile = FORMULA_RB.equals(fileName) ?
outputDirectory.resolve(FORMULA).resolve(distribution.getExecutable().getName().concat(RB)) :
outputDirectory.resolve(FORMULA)
.resolve(getHyphenatedName(packager.getFormulaName()).concat(RB)) :
outputDirectory.resolve(fileName);
writeFile(content, outputFile);
}
Expand Down

0 comments on commit 0810947

Please sign in to comment.