Skip to content

Commit

Permalink
fix: develop (#3)
Browse files Browse the repository at this point in the history
* chore: anyops version setup

* chore: anyops version setup

* chore: anyops version setup
  • Loading branch information
semusings authored Feb 18, 2023
1 parent 8f1155e commit 585f267
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Command line interface to build application and launch docker applications for d
## Installation

```bash
$
$ curl -fsSL https://raw.githubusercontent.com/bhuwanupadhyay/anyops/master/install.sh | bash
```

## Docker Compose Applications
Expand Down
57 changes: 57 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
#
# AnyOps installer
#
# Usage:
# curl -fsSL https://raw.githubusercontent.com/bhuwanupadhyay/anyops/master/install.sh | bash

# When releasing AnyOps, the releaser should update this version number
# AFTER they upload new binaries.
VERSION="1.0.0"

set -e

function copy_binary() {
if [[ ":$PATH:" == *":$HOME/.local/bin:"* ]]; then
if [ ! -d "$HOME/.local/bin" ]; then
mkdir -p "$HOME/.local/bin"
fi
mv anyops "$HOME/.local/bin/anyops"
else
echo "Installing Tilt to /usr/local/bin which is write protected"
echo "If you'd prefer to install Anyops without sudo permissions, add \$HOME/.local/bin to your \$PATH and rerun the installer"
sudo mv anyops /usr/local/bin/anyops
fi
}

function install_anyops() {
if [[ "$OSTYPE" == "linux"* ]]; then
case $(uname -m) in
aarch64) ARCH=arm64 ;;
armv7l) ARCH=arm ;;
*) ARCH=$(uname -m) ;;
esac
set -x
curl -fsSL https://github.com/bhuwanupadhyay/anyops/releases/download/v$VERSION/anyops-v$VERSION-linux-$ARCH.tar.gz | tar -xzv anyops
copy_binary
elif [[ "$OSTYPE" == "darwin"* ]]; then
ARCH=$(uname -m)
set -x
curl -fsSL https://github.com/bhuwanupadhyay/anyops/releases/download/v$VERSION/anyops-v$VERSION-darwin-$ARCH.tar.gz | tar -xzv anyops
copy_binary
else
set +x
echo "The AnyOps installer does not work for your platform: $OSTYPE"
echo "For other installation options, download from the following page:"
echo "https://github.com/bhuwanupadhyay/anyops/releases/"
echo "Thank you!"
exit 1
fi

set +x
}

# so that we can skip installation in CI and just test the version check
if [[ -z $NO_INSTALL ]]; then
install_anyops
fi

0 comments on commit 585f267

Please sign in to comment.