Skip to content

Commit

Permalink
Fix release.yml and install.sh for GH releases (#12)
Browse files Browse the repository at this point in the history
update to build proper zip file for release with updated install script to setup paths and fixed settings.yaml with proper URI
  • Loading branch information
peterjmorgan authored Apr 2, 2021
1 parent 2e3018e commit ed9deb8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ jobs:
- name: Copy
run: |
docker run --rm --entrypoint cat static-build target/x86_64-unknown-linux-musl/release/phylum-cli > phylum-cli
mkdir phylum-cli-release
cp lib/install.sh phylum-cli-release/
cp lib/src/bin/settings.yaml phylum-cli-release/
cp lib/src/bin/phylum-cli.bash phylum-cli-release/
cp phylum-cli phylum-cli-release/
cp lib/install.sh .
cp lib/src/bin/settings.yaml .
cp lib/src/bin/phylum-cli.bash .
- name: Build zipfile
run: zip phylum-cli-release.zip phylum-cli install.sh settings.yaml phylum-cli.bash
run: zip -r phylum-cli-release phylum-cli-release
- uses: softprops/action-gh-release@v1
name: Release
with:
Expand Down
26 changes: 24 additions & 2 deletions lib/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
#!/bin/bash
mkdir -p ${HOME}/.phylum
cp -n src/bin/settings.yaml ${HOME}/.phylum/
cp -f src/bin/phylum-cli.bash ${HOME}/.phylum/

if [ -f src/bin/settings.yaml ]; then
cp -f src/bin/settings.yaml ${HOME}/.phylum/
elif [ -f settings.yaml ]; then
cp -f settings.yaml ${HOME}/.phylum/
else
echo "Can't find settings.yaml"
fi

if [ -f src/bin/phylum-cli.bash ]; then
cp -f src/bin/phylum-cli.bash ${HOME}/.phylum/
elif [ -f phylum-cli.bash ]; then
cp -f phylum-cli.bash ${HOME}/.phylum/
else
echo "Can't find phylum-cli.bash"
fi

if [ -f src/bin/phylum-cli ]; then
cp -f src/bin/phylum-cli ${HOME}/.phylum/
elif [ -f phylum-cli ]; then
cp -f phylum-cli ${HOME}/.phylum/
else
echo "Can't find phylum-cli"
fi

if ! grep -q 'phylum-cli.bash' $HOME/.bashrc ;
then
Expand Down
2 changes: 1 addition & 1 deletion lib/src/bin/settings.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
connection:
uri: "http://127.0.0.1"
uri: "https://api.phylum.io"
auth_info:
user: [email protected]
pass: abcd1234
Expand Down

0 comments on commit ed9deb8

Please sign in to comment.