Skip to content

Commit 6abe406

Browse files
committed
Improve CI handling of generated script
1 parent 6c8b925 commit 6abe406

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/build-and-snapshot.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,26 @@ jobs:
4848
name: cf-cli-java-plugin-${{ matrix.os }}
4949
path: dist/
5050

51+
- name: Install cf
52+
if: matrix.os == 'ubuntu-latest'
53+
run: |
54+
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo gpg --dearmor -o /usr/share/keyrings/cli.cloudfoundry.org.gpg
55+
echo "deb [signed-by=/usr/share/keyrings/cli.cloudfoundry.org.gpg] https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
56+
sudo apt-get update
57+
sudo apt-get install -y cf8-cli
58+
5159
- name: Run 'cf java generate-alias-script'
60+
if: matrix.os == 'ubuntu-latest'
5261
run: |
5362
make install
54-
cf java generate-alias-script > script.sh
63+
cf java generate-alias-script > dist/script.sh
5564
5665
- name: Upload script
66+
if: matrix.os == 'ubuntu-latest'
5767
uses: actions/upload-artifact@v4
5868
with:
5969
name: script.sh
70+
path: dist/
6071

6172
release:
6273
name: Create Snapshot Release

cf_cli_java_plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ export -f java_pid
578578
local pid
579579
pid=$(java_pid) || return 1
580580
%s
581-
%s
581+
%s
582582
}
583583
export -f %s
584584
`, command.Name, indentLines(prefixCommand, " "), aliasCommand, command.Name)

0 commit comments

Comments
 (0)