Skip to content

Commit

Permalink
fix: install one directory higher up the tree
Browse files Browse the repository at this point in the history
The Shorebird archive file contains a whole file tree with `/bin`, so it
does not make sense to install the whole archive contents in `/bin`.

The following illustrates the structure of the archive:

```shell
shorebird-0.21.1
├── AUTHORS
├── COPYRIGHT
├── LICENSE-APACHE
├── LICENSE-MIT
├── NOTES_ON_CODEPUSH.md
├── README.md
├── RELEASE_NOTES.md
├── TRUSTED_TESTERS.md
├── analysis_options.yaml
├── bin
│   ├── internal
│   ├── shorebird
│   ├── shorebird.bat
│   └── shorebird.ps1
├── generate_combined_coverage.sh
├── packages
│   ├── artifact_proxy
│   ├── discord_gcp_alerts
│   ├── jwt
│   ├── redis_client
│   ├── scoped
│   ├── shorebird_cli
│   ├── shorebird_code_push_client
│   └── shorebird_code_push_protocol
├── scripts
│   ├── bootstrap.sh
│   └── patch_e2e.sh
└── third_party
    ├── README.md
    └── flutter
```
  • Loading branch information
johnmartel committed Jan 17, 2024
1 parent ff28e5d commit 648589e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ download_release() {
install_version() {
local install_type="$1"
local version="$2"
local install_path="${3%/bin}/bin"
local install_path="${3%/bin}"

if [ "$install_type" != "version" ]; then
fail "asdf-$TOOL_NAME supports release installs only"
Expand All @@ -60,8 +60,7 @@ install_version() {

local tool_cmd
tool_cmd="$(echo "$TOOL_TEST" | cut -d' ' -f1)"
chmod +x "$install_path/$tool_cmd"
test -x "$install_path/$tool_cmd" || fail "Expected $install_path/$tool_cmd to be executable."
test -x "$install_path/bin/$tool_cmd" || fail "Expected $install_path/bin/$tool_cmd to be executable."

echo "$TOOL_NAME $version installation was successful!"
) || (
Expand Down

0 comments on commit 648589e

Please sign in to comment.