-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add support to build linux/mac arm64
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
- Loading branch information
Showing
6 changed files
with
117 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
set -xeuo pipefail | ||
|
||
# Installs the porter CLI for a single user. | ||
# PORTER_HOME: Location where Porter is installed (defaults to ~/.porter). | ||
# PORTER_MIRROR: Base URL where Porter assets, such as binaries and atom feeds, are downloaded. This lets you | ||
# setup an internal mirror. | ||
# PORTER_PERMALINK: The version of Porter to install, such as vX.Y.Z, latest or canary. | ||
# PKG_PERMALINK: The version of mixins and plugins to install, such as latest or canary. | ||
|
||
export PORTER_HOME=${PORTER_HOME:-~/.porter} | ||
export PORTER_MIRROR=${PORTER_MIRROR:-https://cdn.porter.sh} | ||
PORTER_PERMALINK=${PORTER_PERMALINK:-latest} | ||
PKG_PERMALINK=${PKG_PERMALINK:-latest} | ||
|
||
echo "Installing porter@$PORTER_PERMALINK to $PORTER_HOME from $PORTER_MIRROR" | ||
|
||
mkdir -p $PORTER_HOME/runtimes | ||
|
||
curl -fsSLo $PORTER_HOME/porter $PORTER_MIRROR/$PORTER_PERMALINK/porter-linux-arm64 | ||
chmod +x $PORTER_HOME/porter | ||
cp $PORTER_HOME/porter $PORTER_HOME/runtimes/porter-runtime | ||
echo Installed `$PORTER_HOME/porter version` | ||
|
||
$PORTER_HOME/porter mixin install exec --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install kubernetes --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install helm --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install arm --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install terraform --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install az --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install aws --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install gcloud --version $PKG_PERMALINK | ||
|
||
$PORTER_HOME/porter plugin install azure --version $PKG_PERMALINK | ||
|
||
echo "Installation complete." | ||
echo "Add porter to your path by adding the following line to your ~/.profile and open a new terminal:" | ||
echo "export PATH=\$PATH:~/.porter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
set -xeuo pipefail | ||
|
||
# Installs the porter CLI for a single user. | ||
# PORTER_HOME: Location where Porter is installed (defaults to ~/.porter). | ||
# PORTER_MIRROR: Base URL where Porter assets, such as binaries and atom feeds, are downloaded. This lets you | ||
# setup an internal mirror. | ||
# PORTER_PERMALINK: The version of Porter to install, such as vX.Y.Z, latest or canary. | ||
# PKG_PERMALINK: The version of mixins and plugins to install, such as latest or canary. | ||
|
||
export PORTER_HOME=${PORTER_HOME:-~/.porter} | ||
export PORTER_MIRROR=${PORTER_MIRROR:-https://cdn.porter.sh} | ||
PORTER_PERMALINK=${PORTER_PERMALINK:-latest} | ||
PKG_PERMALINK=${PKG_PERMALINK:-latest} | ||
|
||
echo "Installing porter@$PORTER_PERMALINK to $PORTER_HOME from $PORTER_MIRROR" | ||
|
||
mkdir -p $PORTER_HOME/runtimes | ||
|
||
curl -fsSLo $PORTER_HOME/porter $PORTER_MIRROR/$PORTER_PERMALINK/porter-darwin-arm64 | ||
curl -fsSLo $PORTER_HOME/runtimes/porter-runtime $PORTER_MIRROR/$PORTER_PERMALINK/porter-linux-arm64 | ||
chmod +x $PORTER_HOME/porter | ||
chmod +x $PORTER_HOME/runtimes/porter-runtime | ||
echo Installed `$PORTER_HOME/porter version` | ||
|
||
$PORTER_HOME/porter mixin install exec --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install kubernetes --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install helm --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install arm --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install terraform --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install az --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install aws --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install gcloud --version $PKG_PERMALINK | ||
|
||
$PORTER_HOME/porter plugin install azure --version $PKG_PERMALINK | ||
|
||
echo "Installation complete." | ||
echo "Add porter to your path by adding the following line to your ~/.bash_profile or ~/.zprofile and open a new terminal:" | ||
echo "export PATH=\$PATH:~/.porter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
export PATH=$PATH:~/.porter | ||
|
||
PORTER_PERMALINK=canary ./scripts/install/install-linux-arm64.sh | ||
porter list | ||
|
||
PORTER_PERMALINK=v0.23.0-beta.1 ./scripts/install/install-linux-arm64.sh | ||
porter version | grep v0.23.0-beta.1 | ||
|
||
PORTER_PERMALINK=latest ./scripts/install/install-linux-arm64.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
export PATH=$PATH:~/.porter | ||
|
||
PORTER_PERMALINK=canary ./scripts/install/install-mac-arm64.sh | ||
porter list | ||
|
||
PORTER_PERMALINK=v0.23.0-beta.1 ./scripts/install/install-mac-arm64.sh | ||
porter version | grep v0.23.0-beta.1 | ||
|
||
PORTER_PERMALINK=latest ./scripts/install/install-mac-arm64.sh |