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
|
from_secret: gitea_passwd
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
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 && \
|
chmod +x /etc/bash_completion.d/arkanum-completion && \
|
||||||
echo 'source /etc/bash_completion.d/arkanum-completion' >> /etc/bash.bashrc && \
|
echo 'source /etc/bash_completion.d/arkanum-completion' >> /etc/bash.bashrc && \
|
||||||
touch "$HOME/enable_motd" && \
|
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 -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
|
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.
|
nodejs Installs latest NodeJs LTS version.
|
||||||
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.
|
||||||
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
|
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
|
||||||
-h Prints this help message.
|
-h Prints this help message.
|
||||||
|
|
||||||
|
|
32
arkanum
32
arkanum
|
@ -15,6 +15,7 @@ function showHelp() {
|
||||||
nodejs Installs latest NodeJs LTS version.
|
nodejs Installs latest NodeJs LTS version.
|
||||||
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.
|
||||||
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
|
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
|
||||||
-h Prints this help message.
|
-h Prints this help message.
|
||||||
|
|
||||||
|
@ -135,33 +136,37 @@ function instGiteaTools() {
|
||||||
say "done." "Gitea"
|
say "done." "Gitea"
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCodeSettings() {
|
function instCodeExtension() {
|
||||||
CODEFILE="$HOME/data/User/settings.json"
|
say "Downloading required extensions...." "Extension"
|
||||||
say "Downloading required extensions...." "VSCode"
|
|
||||||
# Gitlens
|
# 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
|
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
|
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
|
rm -f /tmp/eamodio.gitlens-13.1.1.vsix
|
||||||
|
|
||||||
# OneDarkPro
|
# 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
|
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
|
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
|
rm -f /tmp/zhuangtongfa.material-theme-3.15.6.vsix
|
||||||
|
|
||||||
# vscode-icons
|
# 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
|
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
|
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
|
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
|
# VSCode user settings file
|
||||||
say "Setting VScode base settings.($CODEFILE)" "VSCode"
|
say "Setting VScode base settings.($CODEFILE)" "VSCode"
|
||||||
cat <<EOF | tee "$CODEFILE"
|
cat <<EOF | tee "$CODEFILE"
|
||||||
|
@ -204,6 +209,9 @@ function main() {
|
||||||
elif [[ "$i" == "--disable-motd" ]]; then
|
elif [[ "$i" == "--disable-motd" ]]; then
|
||||||
disableMotd
|
disableMotd
|
||||||
exit 0
|
exit 0
|
||||||
|
elif [[ "$i" == "--install-extensions" ]]; then
|
||||||
|
instCodeExtension
|
||||||
|
exit 0
|
||||||
elif [[ "$i" == "--reset-codesetting" ]]; then
|
elif [[ "$i" == "--reset-codesetting" ]]; then
|
||||||
setCodeSettings
|
setCodeSettings
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/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…
Reference in New Issue