Rename install script to arkanum (#18)
ci/woodpecker/push/renovate Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/push/next Pipeline was successful Details
ci/woodpecker/push/deploy Pipeline was successful Details

#### 📖 Summary

- updates project name in all refs

#### 📑 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#18
This commit is contained in:
OCram85 2022-11-17 09:55:16 +01:00
parent a697c7ee8f
commit 66ce973182
6 changed files with 57 additions and 47 deletions

View File

@ -1 +1,5 @@
arkanum
Fira
LTS
tbd tbd
dotnet

View File

@ -16,14 +16,16 @@ RUN \
#git config --system credential.helper store && \ #git config --system credential.helper store && \
echo 'source /usr/share/bash-completion/completions/git' >> /etc/bash.bashrc echo 'source /usr/share/bash-completion/completions/git' >> /etc/bash.bashrc
ADD install-devruntime /usr/bin/ ADD arkanum /usr/bin/
ADD install-devruntime-completion /etc/bash_completion.d/ ADD arkanum-completion /etc/bash_completion.d/
RUN \ RUN \
chmod +x /usr/bin/install-devruntime && \ chmod +x /usr/bin/arkanum && \
chmod +x /etc/bash_completion.d/install-devruntime-completion && \ chmod +x /etc/bash_completion.d/arkanum-completion && \
echo 'source /etc/bash_completion.d/install-devruntime-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/enable_motd\" ]]; then echo -e \"Use \\e[32m'install-devruntime'\\e[0m to install missing runtimes like dotnet or NodeJs.\"; fi" >> /etc/bash.bashrc echo "if [[ ! -e \"$HOME/data/User/settings.json\" ]]; then 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
WORKDIR /app/code-server/lib/vscode/out/vs/workbench WORKDIR /app/code-server/lib/vscode/out/vs/workbench
ADD FiraCode/fonts/* ./fonts/ ADD FiraCode/fonts/* ./fonts/

View File

@ -13,7 +13,7 @@
</p> </p>
<h1 align="center"> <h1 align="center">
🧙 Arkanum 🪄 🧙 Arkanum ✨🌌☄️💥
</h1> </h1>
<p align="center"> <p align="center">
@ -44,27 +44,28 @@ Adds default system config with:
> 💡 See [gitconfig-system](./gitconfig-system) for details. > 💡 See [gitconfig-system](./gitconfig-system) for details.
### 🧙 Added `install-devruntime` helper script ### 🧙 Added `arkanum` helper script
Added `install-devruntime` to help installing common runtime in container. Added `arkanum` to help installing common runtime in container.
This helps reducing the image size. This helps reducing the image size.
``` ```
install-devruntime is used to install optional runtimes for developing in a 🧙 arkanum ✨🌌☄️💥 is used to install optional runtimes for developing in a
code-server container environment. code-server container environment.
Syntax: install-devruntime RUNTIME ... Syntax: arkanum RUNTIME ...
RUNTIME [dotnet|golang|nodejs|powershell] RUNTIME [dotnet|golang|nodejs|powershell]
dotnet Installs latest LTS dotnet core sdk + runtime. dotnet Installs latest LTS dotnet core sdk + runtime.
golang Installs golang 1.19.3. golang Installs golang 1.19.3.
nodejs Installs latest NodeJs LTS version. nodejs Installs latest NodeJs LTS version.
powershell Installs latest PowerShell LTS version. powershell Installs latest PowerShell LTS version.
-h Prints this help messagee. --disable-motd Disables hint in new bash terminal.
disablemotd Disables hint in new bash terminal --reset-codesetting Sets VS Code user setting with basic (Fira Code).
setcode Sets VS Code user setting with basic (Fira Code) -h Prints this help message.
Example 1: install-devruntime dotnet Example 1: arkanum dotnet
Example 2: install devruntime golang nodejs Example 2: arkanum golang nodejs
Example 3: arkanum --disable-motd
``` ```
## 💳 Credits ## 💳 Credits

View File

@ -3,45 +3,46 @@
set -e set -e
function showHelp() { function showHelp() {
cat <<HELP cat << HELP
install-devruntime is used to install optional runtimes for developing in a 🧙 arkanum ✨🌌☄️💥 is used to install optional runtimes for developing in a
code-server container environment. code-server container environment.
Syntax: install-devruntime RUNTIME ... Syntax: arkanum RUNTIME ...
RUNTIME [dotnet|golang|nodejs|powershell] RUNTIME [dotnet|golang|nodejs|powershell]
dotnet Installs latest LTS dotnet core sdk + runtime. dotnet Installs latest LTS dotnet core sdk + runtime.
golang Installs golang 1.19.3. golang Installs golang 1.19.3.
nodejs Installs latest NodeJs LTS version. nodejs Installs latest NodeJs LTS version.
powershell Installs latest PowerShell LTS version. powershell Installs latest PowerShell LTS version.
disablemotd Disables hint in new bash terminal. --disable-motd Disables hint in new bash terminal.
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 messagee. -h Prints this help message.
Example 1: install-devruntime dotnet Example 1: arkanum dotnet
Example 2: install devruntime golang nodejs Example 2: arkanum golang nodejs
Example 3: arkanum --disable-motd
HELP HELP
} }
function disableMotd() { function disableMotd() {
if [[ -e "$HOME/enable_motd" ]]; then if [[ -e "$HOME/enable_motd" ]]; then
say "Disabling 'install-devruntime' motd..." "disableMotd" say "Disabling 'arkanum' motd..." "disableMotd"
rm -f "$HOME/enable_motd" rm -f "$HOME/enable_motd"
fi fi
} }
function say() { function say() {
if [[ -n "$2" ]]; then if [[ -n "$2" ]]; then
echo -e "\e[32mInstall-DevRuntime\e[0m \e[34m[$2]\e[0m: $1" echo -e "🧙 \e[32markanum\e[0m \e[34m[⚒️ $2]\e[0m: $1"
else else
echo -e "\e[32mInstall-DevRuntime\e[0m: $1" echo -e "🧙 \e[32markanum\e[0m: $1"
fi fi
} }
function sayE() { function sayE() {
if [[ -n "$2" ]]; then if [[ -n "$2" ]]; then
echo -e "\e[31mInstall-DevRuntime\e[0m \e[34m[$2]\e[0m: $1" 1>&2 echo -e "🧙 \e[31markanum\e[0m \e[34m[⚒️ $2]\e[0m: $1" 1>&2
else else
echo -e "\e[31mInstall-DevRuntime\e[0m: $1" 1>&2 echo -e "🧙 \e[31markanum\e[0m: $1" 1>&2
fi fi
} }
@ -130,14 +131,16 @@ function setCodeSettings() {
say "Setting VScode base settings.($CODEFILE)" say "Setting VScode base settings.($CODEFILE)"
cat <<EOF | tee "$CODEFILE" cat <<EOF | tee "$CODEFILE"
{ {
"window.menuBarVisibility": "compact",
"workbench.colorTheme": "One Dark Pro Darker", "workbench.colorTheme": "One Dark Pro Darker",
"window.menuBarVisibility": "classic", "workbench.iconTheme": "vscode-icons",
"editor.fontFamily": "'FiraCode', 'FiraCode Nerd Font', 'FiraCode NF', Consolas, 'Courier New', monospace", "editor.fontFamily": "'FiraCode', 'FiraCode Nerd Font', 'FiraCode NF', Consolas, 'Courier New', monospace",
"terminal.integrated.fontFamily": "'FiraCode Mono', 'FiraCode Nerd Font Mono', 'FiraCode NFM', Consolas, monospace", "terminal.integrated.fontFamily": "'FiraCode Mono', 'FiraCode Nerd Font Mono', 'FiraCode NFM', Consolas, monospace",
"editor.fontLigatures": true, "editor.fontLigatures": true,
"workbench.iconTheme": "vscode-icons", "editor.formatOnSave": true,
"extensions.autoUpdate": false, "extensions.autoUpdate": false,
"git.confirmSync": false "git.confirmSync": false,
"telemetry.telemetryLevel": "off"
} }
EOF EOF
} }
@ -160,10 +163,10 @@ function main() {
instNodeJs instNodeJs
elif [[ "$i" == "powershell" ]]; then elif [[ "$i" == "powershell" ]]; then
instPwsh instPwsh
elif [[ "$i" == "disablemotd" ]]; then elif [[ "$i" == "--disable-motd" ]]; then
disableMotd disableMotd
exit 0 exit 0
elif [[ "$i" == "codesetting" ]]; then elif [[ "$i" == "--reset-codesetting" ]]; then
setCodeSettings setCodeSettings
exit 0 exit 0
else else

3
arkanum-completion Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
complete -W "--disable-motd --reset-codesetting dotnet golang nodejs powershell -h" arkanum

View File

@ -1,3 +0,0 @@
#!/bin/bash
complete -W "codesetting disablemotd dotnet golang nodejs powershell -h" install-devruntime