generated from Templates/Baseline
Adds Volta as default version manager for NodeJs (#53)
#### 📖 Summary - Adds Volta - Using Volta as default method for installing global nodejs@lts version. #### 📑 Test Plan > 💡 Select your test plan for the code changes. - [x] CI pipeline tests - [ ] Custom test - [ ] No test plan ##### Details / Justification <!-- Add your test details or justification for missing tests here. --> #### 📚 Additional Notes - fixes #50 Co-authored-by: OCram85 <marco.blessing@googlemail.com> Reviewed-on: CodeServer/arkanum#53
This commit is contained in:
parent
8c9c9e5138
commit
33f8bc90c0
|
@ -22,3 +22,4 @@ srv
|
||||||
tbd
|
tbd
|
||||||
traefik
|
traefik
|
||||||
tuanpham
|
tuanpham
|
||||||
|
volta
|
||||||
|
|
|
@ -177,7 +177,8 @@ This helps reducing the image size.
|
||||||
dotnet Installs latest LTS dotnet core sdk + runtime.
|
dotnet Installs latest LTS dotnet core sdk + runtime.
|
||||||
gitea Installs gitea tools like the changelog generator.
|
gitea Installs gitea tools like the changelog generator.
|
||||||
golang Installs golang 1.19.3.
|
golang Installs golang 1.19.3.
|
||||||
nodejs Installs latest NodeJs LTS version.
|
nodejs Installs latest NodeJs LTS version using Volta.
|
||||||
|
volta Installs Volta as NodeJs version manager.
|
||||||
powershell Installs latest PowerShell LTS version.
|
powershell Installs latest PowerShell LTS version.
|
||||||
--disable-motd Disables hint in new bash terminal.
|
--disable-motd Disables hint in new bash terminal.
|
||||||
--install-extensions Installs predefined recommended extensions.
|
--install-extensions Installs predefined recommended extensions.
|
||||||
|
|
33
arkanum
33
arkanum
|
@ -12,7 +12,8 @@ function showHelp() {
|
||||||
dotnet Installs latest LTS dotnet core sdk + runtime.
|
dotnet Installs latest LTS dotnet core sdk + runtime.
|
||||||
gitea Installs gitea tools like the changelog generator.
|
gitea Installs gitea tools like the changelog generator.
|
||||||
golang Installs golang 1.19.3.
|
golang Installs golang 1.19.3.
|
||||||
nodejs Installs latest NodeJs LTS version.
|
nodejs Installs latest NodeJs LTS version using Volta.
|
||||||
|
volta Installs Volta as NodeJS version manager.
|
||||||
powershell Installs latest PowerShell LTS version.
|
powershell Installs latest PowerShell LTS version.
|
||||||
--disable-motd Disables hint in new bash terminal.
|
--disable-motd Disables hint in new bash terminal.
|
||||||
--install-extensions Installs predefined recommended extensions.
|
--install-extensions Installs predefined recommended extensions.
|
||||||
|
@ -48,6 +49,14 @@ function sayE() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sayW() {
|
||||||
|
if [[ -n "$2" ]]; then
|
||||||
|
echo -e "🧙 \e[33markanum\e[0m \e[34m[⚒️ $2]\e[0m: $1" 1>&2
|
||||||
|
else
|
||||||
|
echo -e "🧙 \e[33markanum\e[0m: $1" 1>&2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function instDotNet() {
|
function instDotNet() {
|
||||||
say "Installing dotnet requirements..." "dotnet"
|
say "Installing dotnet requirements..." "dotnet"
|
||||||
sudo -E apt-get update > /dev/null
|
sudo -E apt-get update > /dev/null
|
||||||
|
@ -107,6 +116,18 @@ function instNodeJs() {
|
||||||
say "done." "NodeJs"
|
say "done." "NodeJs"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function instNodeJS2() {
|
||||||
|
say "Installing NodeJS LTS via Volta..." "NodeJS"
|
||||||
|
volta install node@lts
|
||||||
|
say "done." "NodeJS"
|
||||||
|
}
|
||||||
|
|
||||||
|
function instVolta() {
|
||||||
|
say "Installing Volta as NodeJS version manager..." "Volta"
|
||||||
|
curl -#fSl https://get.volta.sh | bash
|
||||||
|
say "done." "Volta"
|
||||||
|
}
|
||||||
|
|
||||||
function instPwsh() {
|
function instPwsh() {
|
||||||
say "Installing PowerShell requirements..." "PowerShell"
|
say "Installing PowerShell requirements..." "PowerShell"
|
||||||
sudo -E apt-get install --no-install-recommends -y \
|
sudo -E apt-get install --no-install-recommends -y \
|
||||||
|
@ -211,7 +232,15 @@ function main() {
|
||||||
elif [[ "$i" == "golang" ]]; then
|
elif [[ "$i" == "golang" ]]; then
|
||||||
instGoLang
|
instGoLang
|
||||||
elif [[ "$i" == "nodejs" ]]; then
|
elif [[ "$i" == "nodejs" ]]; then
|
||||||
instNodeJs
|
if [[ "$2" == "--legacy" ]]; then
|
||||||
|
sayW "Installing NodeJS with legacy function" "Arkanum"
|
||||||
|
instNodeJs
|
||||||
|
else
|
||||||
|
instVolta
|
||||||
|
instNodeJS2
|
||||||
|
fi
|
||||||
|
elif [[ "$i" == "volta" ]]; then
|
||||||
|
instVolta
|
||||||
elif [[ "$i" == "powershell" ]]; then
|
elif [[ "$i" == "powershell" ]]; then
|
||||||
instPwsh
|
instPwsh
|
||||||
elif [[ "$i" == "gitea" ]]; then
|
elif [[ "$i" == "gitea" ]]; then
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
complete -W "--disable-motd --install-extensions --reset-codesetting dotnet gitea golang nodejs powershell -h" arkanum
|
complete -W "--disable-motd --install-extensions --reset-codesetting dotnet gitea golang nodejs volta powershell -h" arkanum
|
||||||
|
|
Loading…
Reference in New Issue