generated from Templates/Baseline
Splits extension install into seperate function (#23)
#### 📖 Summary - implements `--install-extensions` function #### 📑 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 <!-- A place for additional detail notes. --> Co-authored-by: OCram85 <marco.blessing@googlemail.com> Reviewed-on: CodeServer/arkanum#23
This commit is contained in:
parent
42f88fd718
commit
7692b04908
@ -17,3 +17,13 @@ pipeline:
|
||||
from_secret: gitea_passwd
|
||||
when:
|
||||
event: pull_request
|
||||
|
||||
triggerPortainer:
|
||||
image: ocram85/portainer-serviceupdate
|
||||
settings:
|
||||
#VERBOSE: true
|
||||
URI: "https://portainer.ocram85.com"
|
||||
TOKEN:
|
||||
from_secret: NEXT_TOKEN
|
||||
when:
|
||||
event: pull_request
|
@ -23,7 +23,7 @@ RUN \
|
||||
chmod +x /etc/bash_completion.d/arkanum-completion && \
|
||||
echo 'source /etc/bash_completion.d/arkanum-completion' >> /etc/bash.bashrc && \
|
||||
touch "$HOME/enable_motd" && \
|
||||
echo "if [[ ! -e \"$HOME/data/User/settings.json\" ]]; then arkanum --reset-codesetting && \
|
||||
echo "if [[ ! -e \"$HOME/data/User/settings.json\" ]]; then arkanum --install-extensions && arkanum --reset-codesetting && \
|
||||
echo -e \"🧙 \\e[32markanum\\e[0m: Please reload Arkanum to finalize the setup...\" && read foo; fi" >> /etc/bash.bashrc && \
|
||||
echo "if [[ -e \"$HOME/enable_motd\" ]]; then echo -e \"Use 🧙 \\e[32m'arkanum'\\e[0m to install missing runtimes like dotnet or NodeJs.\"; fi" >> /etc/bash.bashrc
|
||||
|
||||
|
@ -62,6 +62,7 @@ This helps reducing the image size.
|
||||
nodejs Installs latest NodeJs LTS version.
|
||||
powershell Installs latest PowerShell LTS version.
|
||||
--disable-motd Disables hint in new bash terminal.
|
||||
--install-extensions Installs predefined recommended extensions.
|
||||
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
|
||||
-h Prints this help message.
|
||||
|
||||
|
32
arkanum
32
arkanum
@ -15,6 +15,7 @@ function showHelp() {
|
||||
nodejs Installs latest NodeJs LTS version.
|
||||
powershell Installs latest PowerShell LTS version.
|
||||
--disable-motd Disables hint in new bash terminal.
|
||||
--install-extensions Installs predefined recommended extensions.
|
||||
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
|
||||
-h Prints this help message.
|
||||
|
||||
@ -135,33 +136,37 @@ function instGiteaTools() {
|
||||
say "done." "Gitea"
|
||||
}
|
||||
|
||||
function setCodeSettings() {
|
||||
CODEFILE="$HOME/data/User/settings.json"
|
||||
say "Downloading required extensions...." "VSCode"
|
||||
function instCodeExtension() {
|
||||
say "Downloading required extensions...." "Extension"
|
||||
# Gitlens
|
||||
say "Downloading 'gitlens'..." "VSCode"
|
||||
say "Downloading 'gitlens'..." "Extension"
|
||||
curl -fsSL https://open-vsx.org/api/eamodio/gitlens/13.1.1/file/eamodio.gitlens-13.1.1.vsix -o /tmp/eamodio.gitlens-13.1.1.vsix
|
||||
say "Installing 'gitlens'..." "VSCode"
|
||||
say "Installing 'gitlens'..." "Extension"
|
||||
install-extension /tmp/eamodio.gitlens-13.1.1.vsix
|
||||
say "Cleaning up 'gitlens' install files" "VSCode"
|
||||
say "Cleaning up 'gitlens' install files" "Extension"
|
||||
rm -f /tmp/eamodio.gitlens-13.1.1.vsix
|
||||
|
||||
# OneDarkPro
|
||||
say "Downloading 'One Dark Pro' theme..." "VSCode"
|
||||
say "Downloading 'One Dark Pro' theme..." "V"
|
||||
curl -fsSL https://open-vsx.org/api/zhuangtongfa/material-theme/3.15.6/file/zhuangtongfa.material-theme-3.15.6.vsix -o /tmp/zhuangtongfa.material-theme-3.15.6.vsix
|
||||
say "Installing 'One Dark Pro' theme..." "VSCode"
|
||||
say "Installing 'One Dark Pro' theme..." "Extension"
|
||||
install-extension /tmp/zhuangtongfa.material-theme-3.15.6.vsix
|
||||
say "Cleaning up 'One Dark Pro' install files" "VSCode"
|
||||
say "Cleaning up 'One Dark Pro' install files" "Extension"
|
||||
rm -f /tmp/zhuangtongfa.material-theme-3.15.6.vsix
|
||||
|
||||
# vscode-icons
|
||||
say "Downloading 'vscode-icons' theme..." "VSCode"
|
||||
say "Downloading 'vscode-icons' theme..." "Extension"
|
||||
curl -fsSL https://open-vsx.org/api/vscode-icons-team/vscode-icons/12.0.1/file/vscode-icons-team.vscode-icons-12.0.1.vsix -o /tmp/vscode-icons-team.vscode-icons-12.0.1.vsix
|
||||
say "Installing 'vscode-icons' theme..." "VSCode"
|
||||
say "Installing 'vscode-icons' theme..." "Extension"
|
||||
install-extension /tmp/vscode-icons-team.vscode-icons-12.0.1.vsix
|
||||
say "Cleaning up 'vscode-icons' install files" "VSCode"
|
||||
say "Cleaning up 'vscode-icons' install files" "Extension"
|
||||
rm -f /tmp/vscode-icons-team.vscode-icons-12.0.1.vsix
|
||||
|
||||
say "done." "Extension"
|
||||
}
|
||||
function setCodeSettings() {
|
||||
CODEFILE="$HOME/data/User/settings.json"
|
||||
|
||||
# VSCode user settings file
|
||||
say "Setting VScode base settings.($CODEFILE)" "VSCode"
|
||||
cat <<EOF | tee "$CODEFILE"
|
||||
@ -204,6 +209,9 @@ function main() {
|
||||
elif [[ "$i" == "--disable-motd" ]]; then
|
||||
disableMotd
|
||||
exit 0
|
||||
elif [[ "$i" == "--install-extensions" ]]; then
|
||||
instCodeExtension
|
||||
exit 0
|
||||
elif [[ "$i" == "--reset-codesetting" ]]; then
|
||||
setCodeSettings
|
||||
exit 0
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
complete -W "--disable-motd --reset-codesetting dotnet gitea golang nodejs powershell -h" arkanum
|
||||
complete -W "--disable-motd --install-extensions --reset-codesetting dotnet gitea golang nodejs powershell -h" arkanum
|
||||
|
Loading…
x
Reference in New Issue
Block a user