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 authored and aalmiray committed Oct 27, 2022
1 parent c855acd commit 256f444
Showing 1 changed file with 3 additions and 1 deletion.
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 256f444

Please sign in to comment.