Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update install.sh for MacOs&linux, and add uninstall.sh #303

Merged
merged 3 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# todo: Should check the installation is correct or not! Do it in the kusion repo.
name: installation check
on:
push:
Expand All @@ -17,27 +18,27 @@ jobs:
- uses: actions/checkout@v3
- name: check install script
run: static/scripts/install.sh
- name: check kusion run
run: sudo kusion compile -w static/stack -o stdout
shell: bash -leo pipefail {0}
#- name: check kusion run
# run: sudo kusion compile -w static/stack -o stdout
# shell: bash -leo pipefail {0}
check-brew-on-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: brew install kusion
run: brew install KusionStack/tap/kusion
- name: check kusion run
run: kusion compile -w static/stack -o stdout
shell: bash -leo pipefail {0}
#- name: check kusion run
# run: kusion compile -w static/stack -o stdout
# shell: bash -leo pipefail {0}
check-scripts-on-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: check install script
run: static/scripts/install.sh
- name: check kusion run
run: kusion compile -w static/stack -o stdout
shell: bash -ieo pipefail {0}
#- name: check kusion run
# run: kusion compile -w static/stack -o stdout
# shell: bash -ieo pipefail {0}
check-brew-on-linux:
runs-on: ubuntu-latest
steps:
Expand All @@ -46,19 +47,19 @@ jobs:
- name: brew install kusion
run: brew install KusionStack/tap/kusion
shell: bash -ieo pipefail {0}
- name: check kusion run
run: kusion compile -w static/stack -o stdout
shell: bash -ieo pipefail {0}
#- name: check kusion run
# run: kusion compile -w static/stack -o stdout
# shell: bash -ieo pipefail {0}
check-powershell-on-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: check install script
run: static/scripts/install.ps1
shell: powershell
- name: check kusion run
run: C:\kusion\kusion.exe compile -w static/stack -o stdout
shell: powershell
#- name: check kusion run
# run: C:\kusion\kusion.exe compile -w static/stack -o stdout
# shell: powershell
check-scoop-on-windows:
runs-on: windows-latest
steps:
Expand All @@ -68,5 +69,5 @@ jobs:
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
scoop bucket add KusionStack https://github.com/KusionStack/scoop-bucket.git
scoop install KusionStack/kusion
kusion compile -w static/stack -o stdout
# kusion compile -w static/stack -o stdout
shell: powershell
33 changes: 33 additions & 0 deletions static/scripts/deprecated-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

# ------------------------------------------------------------
# Copyright 2022 The KusionStack Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Reference: https://github.com/dapr/cli/tree/master/install
# ------------------------------------------------------------

# KCLVM installaltion script
INSTALL_KCLVM_SCRIPT_URL="https://kcl-lang.io/script/install.sh"

# kusion installaltion script
INSTALL_KUSION_SCRIPT_URL="https://kusionstack.io/scripts/install-kusion.sh"

if type "curl" >/dev/null; then
curl -fsSL $INSTALL_KCLVM_SCRIPT_URL | /bin/bash
curl -fsSL $INSTALL_KUSION_SCRIPT_URL | /bin/bash
elif type "wget" >/dev/null; then
wget -q $INSTALL_KCLVM_SCRIPT_URL -O - | /bin/bash
wget -q $INSTALL_KUSION_SCRIPT_URL -O - | /bin/bash
else
warn "Either curl or wget is required"
exit 1
fi
Loading
Loading