Skip to content

Commit a462f98

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

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,27 @@ jobs:
4141

4242
- name: Build binary
4343
run: python3 .github/workflows/build.py
44+
45+
- name: Install cf
46+
if: matrix.os == 'ubuntu-latest'
47+
run: |
48+
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo gpg --dearmor -o /usr/share/keyrings/cli.cloudfoundry.org.gpg
49+
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
50+
sudo apt-get update
51+
sudo apt-get install -y cf8-cli
4452
53+
- name: Run 'cf java generate-alias-script'
54+
if: matrix.os == 'ubuntu-latest'
55+
run: |
56+
make install
57+
cf java generate-alias-script > dist/script.sh
58+
4559
- name: Upload artifact
4660
uses: actions/upload-artifact@v4
4761
with:
4862
name: cf-cli-java-plugin-${{ matrix.os }}
4963
path: dist/
5064

51-
- name: Run 'cf java generate-alias-script'
52-
run: |
53-
make install
54-
cf java generate-alias-script > script.sh
55-
56-
- name: Upload script
57-
uses: actions/upload-artifact@v4
58-
with:
59-
name: script.sh
6065

6166
release:
6267
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)