Skip to content

Commit

Permalink
feat: update install.sh for MacOs&linux, and add uninstall.sh (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
healthjyk authored Sep 25, 2023
1 parent 68c75af commit c7dd6f8
Show file tree
Hide file tree
Showing 11 changed files with 576 additions and 84 deletions.
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
File renamed without changes.
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

0 comments on commit c7dd6f8

Please sign in to comment.