Skip to content

Commit 2929a97

Browse files
committed
Fix Inklecate. Update publish GHA to include inklecate.
1 parent d163de5 commit 2929a97

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
run: chmod +x gradlew
1717
- name: Build
1818
run: ./gradlew build
19+
- name: Build inklecate jar
20+
run: ./gradlew :inklecate:jar
1921
- name: Import GPG key
2022
id: import_gpg
2123
uses: crazy-max/ghaction-import-gpg@v5
@@ -40,3 +42,7 @@ jobs:
4042
-Psigning.gnupg.keyId=${{ secrets.GPG_KEYID }} \
4143
-Psigning.gnupg.passphrase=${{ secrets.GPG_PASSPHRASE }} \
4244
-Psigning.gnupg.keyName=${{ secrets.GPG_KEYID }}
45+
- name: Upload inklecate jar to GitHub Release
46+
uses: softprops/action-gh-release@v1
47+
with:
48+
files: inklecate/build/libs/*.jar

inklecate/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@ dependencies {
1818
application {
1919
mainClass = 'com.bladecoder.ink.inklecate.CommandLineTool'
2020
}
21+
22+
jar {
23+
manifest.attributes += [
24+
'Main-Class': application.mainClass
25+
]
26+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
27+
from {
28+
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
29+
}
30+
}

inklecate/src/main/java/com/bladecoder/ink/inklecate/CommandLineTool.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ private CommandLineTool(String[] args) {
6969
outputBaseDir = parent;
7070
}
7171

72+
opts.inputFile = fullFilename.getFileName().toString();
73+
7274
if (outputFileWasRelative) {
73-
opts.outputFile = outputBaseDir.resolve(opts.outputFile).toString();
75+
opts.outputFile = outputBaseDir
76+
.resolve(changeExtension(opts.inputFile, ".ink.json"))
77+
.toString();
7478
}
7579

76-
opts.inputFile = fullFilename.getFileName().toString();
7780
inputString = readFile(fullFilename.toString());
7881
} catch (IOException e) {
7982
System.out.println("Could not open file '" + opts.inputFile + "'");

0 commit comments

Comments
 (0)