Skip to content

Commit

Permalink
feat: allow installation of specific branch or commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBeucher committed Jul 30, 2024
1 parent 68b154d commit e29ff95
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,18 @@ Prerequisites:
- [Moonlight](https://moonlight-stream.org/) streaming client
- [Docker](https://docs.docker.com/engine/install/) (other container engine support will come soon)

Install `cloudypad` CLI:
Install latest version of `cloudypad` CLI:

```sh
curl -fsSL https://raw.githubusercontent.com/PierreBeucher/cloudypad/master/install.sh | sh
```

Living on the edge? Install directly from a branch or a Git commit:

```sh
curl -fsSL https://raw.githubusercontent.com/PierreBeucher/cloudypad/master/install.sh | CLOUDYPAD_VERSION="master" sh
```

You may need to setup a few things on your Cloud provider (eg. API key or SSH key). Checkout [per-Clouder setup specifities](#detailed-setup-per-clouder).

Once ready, create your instance with `cloudypad` CLI:
Expand Down
2 changes: 1 addition & 1 deletion hack/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ VERSION_REGEX="[0-9]\+\.[0-9]\+\.[0-9]\+\([-a-zA-Z0-9]*\)\?"

# Replace CLOUDYPAD_VERSION in cloudypad.sh with any semantic version including those with additional characters
sed -i "s/CLOUDYPAD_VERSION=$VERSION_REGEX/CLOUDYPAD_VERSION=$NEW_VERSION/" cloudypad.sh
sed -i "s/CLOUDYPAD_VERSION=$VERSION_REGEX/CLOUDYPAD_VERSION=$NEW_VERSION/" install.sh
sed -i "s/DEFAULT_CLOUDYPAD_VERSION=$VERSION_REGEX/DEFAULT_CLOUDYPAD_VERSION=$NEW_VERSION/" install.sh

# Replace version in flake.nix with any semantic version including those with additional characters
sed -i "s/version = \"$VERSION_REGEX\";/version = \"$NEW_VERSION\";/" flake.nix
Expand Down
8 changes: 6 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ set -e

# Installation arguments
# Override by setting related environment variable
DEFAULT_CLOUDYPAD_VERSION=0.1.1
CLOUDYPAD_HOME=${CLOUDYPAD_HOME:-"$HOME/.cloudypad"}
CLOUDYPAD_VERSION=0.1.0
CLOUDYPAD_VERSION=${CLOUDYPAD_VERSION:-$DEFAULT_CLOUDYPAD_VERSION}

echo "Installing Cloudy Pad version $CLOUDYPAD_VERSION"

CLOUDYPAD_SCRIPT_URL="https://raw.githubusercontent.com/PierreBeucher/cloudypad/$CLOUDYPAD_VERSION/cloudypad.sh"
# ===

Expand Down Expand Up @@ -33,7 +37,7 @@ chmod 0700 $CLOUDYPAD_HOME
mkdir -p "$INSTALL_DIR"

if command -v curl >/dev/null 2>&1; then
curl -sSL -o "$SCRIPT_PATH" "$CLOUDYPAD_SCRIPT_URL"
curl --fail -sSL -o "$SCRIPT_PATH" "$CLOUDYPAD_SCRIPT_URL"
elif command -v wget >/dev/null 2>&1; then
wget -O "$SCRIPT_PATH" "$CLOUDYPAD_SCRIPT_URL"
else
Expand Down

0 comments on commit e29ff95

Please sign in to comment.