generated from Templates/Baseline
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
173ec41f6d | |||
aa23316413 | |||
21c6ef703f | |||
b0fbd8edf6 | |||
a1a4c2b1e9 | |||
e700e7b477 | |||
26754e83f9 | |||
7fe6062a8f | |||
d18eac86bb |
@ -1,49 +0,0 @@
|
|||||||
depends_on:
|
|
||||||
- test
|
|
||||||
|
|
||||||
pipeline:
|
|
||||||
buildImage:
|
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
|
||||||
settings:
|
|
||||||
registry: gitea.ocram85.com
|
|
||||||
repo: gitea.ocram85.com/codeserver/arkanum
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
auto_tag: true
|
|
||||||
username:
|
|
||||||
from_secret: gitea_user
|
|
||||||
password:
|
|
||||||
from_secret: gitea_passwd
|
|
||||||
build_args:
|
|
||||||
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
|
||||||
- TAG=${CI_COMMIT_TAG}
|
|
||||||
when:
|
|
||||||
event: push
|
|
||||||
branch: master
|
|
||||||
|
|
||||||
buildTag:
|
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
|
||||||
settings:
|
|
||||||
registry: gitea.ocram85.com
|
|
||||||
repo: gitea.ocram85.com/codeserver/arkanum
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
auto_tag: true
|
|
||||||
username:
|
|
||||||
from_secret: gitea_user
|
|
||||||
password:
|
|
||||||
from_secret: gitea_passwd
|
|
||||||
build_args:
|
|
||||||
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
|
||||||
- TAG=${CI_COMMIT_TAG}
|
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
|
|
||||||
GiteaRelease:
|
|
||||||
image: plugins/gitea-release
|
|
||||||
settings:
|
|
||||||
api_key:
|
|
||||||
from_secret: RENOVATE_TOKEN
|
|
||||||
base_url: https://gitea.ocram85.com
|
|
||||||
title: ${CI_COMMIT_TAG}
|
|
||||||
note: "> :bulb: **Note:** See [CHANGELOG.md](src/branch/master/CHANGELOG.md) for recent changes."
|
|
||||||
when:
|
|
||||||
event: tag
|
|
@ -1,32 +0,0 @@
|
|||||||
depends_on:
|
|
||||||
- test
|
|
||||||
|
|
||||||
pipeline:
|
|
||||||
buildTestImage:
|
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
|
||||||
settings:
|
|
||||||
#dry_run: true
|
|
||||||
registry: gitea.ocram85.com
|
|
||||||
repo: gitea.ocram85.com/codeserver/arkanum
|
|
||||||
platforms: linux/amd64
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
tags: next
|
|
||||||
username:
|
|
||||||
from_secret: gitea_user
|
|
||||||
password:
|
|
||||||
from_secret: gitea_passwd
|
|
||||||
build_args:
|
|
||||||
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
|
||||||
- TAG=${CI_COMMIT_TAG}
|
|
||||||
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
|
|
71
.woodpecker/deploy.yml
Normal file
71
.woodpecker/deploy.yml
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
depends_on:
|
||||||
|
- test
|
||||||
|
|
||||||
|
variables:
|
||||||
|
# deployment targets
|
||||||
|
- &publish_repos 'ocram85/arkanum,gitea.ocram85.com/codeserver/arkanum,ghcr.io/ocram85/arkanum,codeberg.org/codeserver/arkanum'
|
||||||
|
# logins for deployment targets
|
||||||
|
- publish_logins: &publish_logins
|
||||||
|
# Default DockerHub login
|
||||||
|
- registry: https://index.docker.io/v1/
|
||||||
|
username:
|
||||||
|
from_secret: docker_user
|
||||||
|
password:
|
||||||
|
from_secret: docker_passwd
|
||||||
|
# Additional Quay.IO login
|
||||||
|
- registry: https://gitea.ocram85.com
|
||||||
|
username:
|
||||||
|
from_secret: gitea_user
|
||||||
|
password:
|
||||||
|
from_secret: gitea_passwd
|
||||||
|
# GitHub Container Registry
|
||||||
|
- registry: https://ghcr.io
|
||||||
|
username:
|
||||||
|
from_secret: github_user
|
||||||
|
password:
|
||||||
|
from_secret: github_passwd
|
||||||
|
# Codeberg
|
||||||
|
- registry: https://codeberg.org
|
||||||
|
username:
|
||||||
|
from_secret: codeberg_user
|
||||||
|
password:
|
||||||
|
from_secret: codeberg_passwd
|
||||||
|
|
||||||
|
steps:
|
||||||
|
latest:
|
||||||
|
image: woodpeckerci/plugin-docker-buildx:2
|
||||||
|
settings:
|
||||||
|
repo: *publish_repos
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
logins: *publish_logins
|
||||||
|
build_args:
|
||||||
|
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
||||||
|
- TAG=${CI_COMMIT_TAG}
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
release:
|
||||||
|
image: woodpeckerci/plugin-docker-buildx:2
|
||||||
|
settings:
|
||||||
|
repo: *publish_repos
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
logins: *publish_logins
|
||||||
|
build_args:
|
||||||
|
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
||||||
|
- TAG=${CI_COMMIT_TAG}
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
GiteaRelease:
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: RENOVATE_TOKEN
|
||||||
|
base_url: https://gitea.ocram85.com
|
||||||
|
title: ${CI_COMMIT_TAG}
|
||||||
|
note: "> :bulb: **Note:** See [CHANGELOG.md](src/branch/master/CHANGELOG.md) for recent changes."
|
||||||
|
when:
|
||||||
|
event: tag
|
57
.woodpecker/next.yml
Normal file
57
.woodpecker/next.yml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
depends_on:
|
||||||
|
- test
|
||||||
|
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
variables:
|
||||||
|
# deployment targets
|
||||||
|
- &publish_repos 'ocram85/arkanum,gitea.ocram85.com/codeserver/arkanum,ghcr.io/ocram85/arkanum,codeberg.org/codeserver/arkanum'
|
||||||
|
# logins for deployment targets
|
||||||
|
- publish_logins: &publish_logins
|
||||||
|
# Default DockerHub login
|
||||||
|
- registry: https://index.docker.io/v1/
|
||||||
|
username:
|
||||||
|
from_secret: docker_user
|
||||||
|
password:
|
||||||
|
from_secret: docker_passwd
|
||||||
|
# Additional Quay.IO login
|
||||||
|
- registry: https://gitea.ocram85.com
|
||||||
|
username:
|
||||||
|
from_secret: gitea_user
|
||||||
|
password:
|
||||||
|
from_secret: gitea_passwd
|
||||||
|
# GitHub Container Registry
|
||||||
|
- registry: https://ghcr.io
|
||||||
|
username:
|
||||||
|
from_secret: github_user
|
||||||
|
password:
|
||||||
|
from_secret: github_passwd
|
||||||
|
# Codeberg
|
||||||
|
- registry: https://codeberg.org
|
||||||
|
username:
|
||||||
|
from_secret: codeberg_user
|
||||||
|
password:
|
||||||
|
from_secret: codeberg_passwd
|
||||||
|
|
||||||
|
steps:
|
||||||
|
buildTestImage:
|
||||||
|
image: woodpeckerci/plugin-docker-buildx:2
|
||||||
|
settings:
|
||||||
|
#dry_run: true
|
||||||
|
repo: *publish_repos
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
tag: next
|
||||||
|
logins: *publish_logins
|
||||||
|
build_args:
|
||||||
|
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
||||||
|
- TAG=${CI_COMMIT_TAG}
|
||||||
|
|
||||||
|
triggerPortainer:
|
||||||
|
image: ocram85/portainer-serviceupdate
|
||||||
|
settings:
|
||||||
|
VERBOSE: true
|
||||||
|
URI: "https://portainer.ocram85.com"
|
||||||
|
TOKEN:
|
||||||
|
from_secret: NEXT_TOKEN
|
@ -1,4 +1,4 @@
|
|||||||
pipeline:
|
steps:
|
||||||
testDockerfile:
|
testDockerfile:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
17
CHANGELOG.md
17
CHANGELOG.md
@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
* 🤖 DEPENDENCIES
|
* 🤖 DEPENDENCIES
|
||||||
* Update quay.io/linuxserver.io/code-server Docker tag to v4.14.1 (#47)
|
* Update quay.io/linuxserver.io/code-server Docker tag to v4.14.1 (#47)
|
||||||
|
|
||||||
## [v0.4.0](https://gitea.ocram85.com/CodeServer/arkanum/releases/tag/v0.4.0) - 2023-07-19
|
## [v0.4.0](https://gitea.ocram85.com/CodeServer/arkanum/releases/tag/v0.4.0) - 2023-07-19
|
||||||
|
|
||||||
* 🐛 BUGFIXES
|
* 🐛 BUGFIXES
|
||||||
@ -81,3 +81,18 @@
|
|||||||
* Adds Volta as default version manager for NodeJs (#53)
|
* Adds Volta as default version manager for NodeJs (#53)
|
||||||
* 🛠️ ENHANCEMENTS
|
* 🛠️ ENHANCEMENTS
|
||||||
* Bump go version (#49)
|
* Bump go version (#49)
|
||||||
|
|
||||||
|
## [v1.0.0](https://gitea.ocram85.com/CodeServer/arkanum/releases/tag/v1.0.0) - 2023-09-15
|
||||||
|
|
||||||
|
* 🐛 BUGFIXES
|
||||||
|
* Fix git config arguments (#68)
|
||||||
|
* Fix NodeJs install bug (#67)
|
||||||
|
* Fix pwsh install when called as first command (#60)
|
||||||
|
* Fix missing volta command (#58)
|
||||||
|
* 🛠️ ENHANCEMENTS
|
||||||
|
* Extends arkanum command and option structure (#62)
|
||||||
|
* 📦 BUILD
|
||||||
|
* Add addiontal container image deployment targets (#63)
|
||||||
|
* 🤖 DEPENDENCIES
|
||||||
|
* Update quay.io/linuxserver.io/code-server Docker tag to v4.16.1 (#59)
|
||||||
|
* Update quay.io/linuxserver.io/code-server Docker tag to v4.15.0 (#57)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM quay.io/linuxserver.io/code-server:4.14.1
|
FROM quay.io/linuxserver.io/code-server:4.16.1
|
||||||
|
|
||||||
#LABEL build_version=""
|
#LABEL build_version=""
|
||||||
LABEL maintainer="OCram85"
|
LABEL maintainer="OCram85"
|
||||||
@ -40,7 +40,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 --install-extensions && arkanum --reset-codesetting && \
|
echo "if [[ ! -e \"$HOME/data/User/settings.json\" ]]; then arkanum config install-extensions && arkanum config reset-codesettings && \
|
||||||
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
|
||||||
|
|
||||||
|
78
README.md
78
README.md
@ -1,12 +1,7 @@
|
|||||||
<p align="right">
|
|
||||||
<img src="http://forthebadge.com/images/badges/built-with-love.svg">
|
|
||||||
<img src="http://forthebadge.com/images/badges/for-you.svg">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://gitea.ocram85.com/CodeServer/arkanum/">
|
<a href="https://gitea.ocram85.com/CodeServer/arkanum/">
|
||||||
<img
|
<img
|
||||||
src="assets/social-logo.png"
|
src="https://gitea.ocram85.com/CodeServer/arkanum/raw/branch/master/assets/social-logo.png"
|
||||||
alt="Container"
|
alt="Container"
|
||||||
>
|
>
|
||||||
</a>
|
</a>
|
||||||
@ -34,10 +29,19 @@ You can download the image from the gitea embedded container registry: `gitea.oc
|
|||||||
|
|
||||||
- `latest` - Is based on the lasted master branch commit.
|
- `latest` - Is based on the lasted master branch commit.
|
||||||
- `next` - Is a test build based on the pull request
|
- `next` - Is a test build based on the pull request
|
||||||
- `1`, `0.1`, `0.1.0` - tag based version.
|
- `1`, `0.1`, `0.1.0`, `1.0.0` - tag based version.
|
||||||
|
|
||||||
> **💡 NOTE: See the [packages page](https://gitea.ocram85.com/CodeServer/-/packages/container/arkanum/latest) for latest version and all other available tags.**
|
> **💡 NOTE: See the [packages page](https://gitea.ocram85.com/CodeServer/-/packages/container/arkanum/latest) for latest version and all other available tags.**
|
||||||
|
|
||||||
|
The container images are also published to these registries:
|
||||||
|
|
||||||
|
- [Docker Hub](https://hub.docker.com/r/ocram85/arkanum)
|
||||||
|
- Pull Endpoint: `ocram85/arkanum`
|
||||||
|
- [GitHub Container Registry](https://github.com/OCram85/arkanum/pkgs/container/arkanum)
|
||||||
|
- Pull Endpoint: `ghcr.io/ocram85/arkanum`
|
||||||
|
- [Codeberg Packages](https://codeberg.org/codeserver/-/packages/container/arkanum/next)
|
||||||
|
- Pull Endpoint: `codeberg.org/codeserver/arkanum`
|
||||||
|
|
||||||
### 2.a Run as Docker Swarm Stack
|
### 2.a Run as Docker Swarm Stack
|
||||||
|
|
||||||
This example shows how to run arkanum as an additional swarm stack.
|
This example shows how to run arkanum as an additional swarm stack.
|
||||||
@ -55,7 +59,7 @@ Therefore you need
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
arkanum:
|
arkanum:
|
||||||
image: gitea.ocram85.com/codeserver/arkanum:0.4.0
|
image: gitea.ocram85.com/codeserver/arkanum:1.0.0
|
||||||
environment:
|
environment:
|
||||||
- PUID=1000
|
- PUID=1000
|
||||||
- PGID=1000
|
- PGID=1000
|
||||||
@ -107,7 +111,7 @@ See their [docs](https://github.com/linuxserver/docker-code-server#parameters) a
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
arkanum:
|
arkanum:
|
||||||
image: gitea.ocram85.com/codeserver/arkanum:0.4.0
|
image: gitea.ocram85.com/codeserver/arkanum:1.0.0
|
||||||
container_name: code-server
|
container_name: code-server
|
||||||
environment:
|
environment:
|
||||||
- PUID=1000
|
- PUID=1000
|
||||||
@ -131,8 +135,7 @@ services:
|
|||||||
After summon Arkanum your first steps should be to set your username and email in the git config:
|
After summon Arkanum your first steps should be to set your username and email in the git config:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git config --global user.name "username"
|
arkanum git setup "my-name" "my-email"
|
||||||
git config --global user.email "email address"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
And that's it. Now you're ready use arkanum as your daily remote code editor. 😄
|
And that's it. Now you're ready use arkanum as your daily remote code editor. 😄
|
||||||
@ -142,7 +145,7 @@ And that's it. Now you're ready use arkanum as your daily remote code editor.
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://gitea.ocram85.com/CodeServer/arkanum/">
|
<a href="https://gitea.ocram85.com/CodeServer/arkanum/">
|
||||||
<img
|
<img
|
||||||
src="assets/screen1.png"
|
src="https://gitea.ocram85.com/CodeServer/arkanum/raw/branch/master/assets/screen1.png"
|
||||||
alt="Screenshot1"
|
alt="Screenshot1"
|
||||||
>
|
>
|
||||||
</a>
|
</a>
|
||||||
@ -170,26 +173,39 @@ Added `arkanum` to help installing common runtimes in container.
|
|||||||
This helps reducing the image size.
|
This helps reducing the image size.
|
||||||
|
|
||||||
```
|
```
|
||||||
🧙 arkanum ✨🌌☄️💥 is used to install optional runtimes for developing in a
|
🧙 arkanum ✨🌌☄️💥 is used to install optional tools for developing in a
|
||||||
code-server container environment.
|
code-server container environment.
|
||||||
|
|
||||||
Syntax: arkanum RUNTIME ...
|
Syntax: arkanum <flags> COMMAND OPTION ARGUMENT
|
||||||
RUNTIME [docker-cli|dotnet|gitea|golang|nodejs|volta|powershell]
|
COMMAND
|
||||||
docker-cli Installs the latest docker-ce cli.
|
config The config command is used to modify arkanum itself.
|
||||||
dotnet Installs latest LTS dotnet core sdk + runtime.
|
git The git command is a wrapper for git helpers.
|
||||||
gitea Installs gitea tools like the changelog generator.
|
install The install command is used to add different tools
|
||||||
golang Installs golang 1.19.3.
|
help Shows this help text.
|
||||||
nodejs Installs latest NodeJs LTS version using Volta.
|
|
||||||
volta Installs Volta as NodeJs version manager.
|
|
||||||
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.
|
|
||||||
|
|
||||||
Example 1: arkanum dotnet
|
OPTION
|
||||||
Example 2: arkanum golang nodejs
|
config:
|
||||||
Example 3: arkanum --disable-motd
|
disable-motd Disables hint in new bash terminal.
|
||||||
|
install extensions Installs predefined recommended extensions.
|
||||||
|
reset-codesettings Sets VS Code user setting with basic (Fira Code).
|
||||||
|
|
||||||
|
git:
|
||||||
|
setup Takes two arguments to setup the git client:
|
||||||
|
1) Username
|
||||||
|
2) Email address
|
||||||
|
|
||||||
|
install:
|
||||||
|
docker-cli Installs the latest docker-cli.
|
||||||
|
dotnet Installs latest LTS dotnet core sdk + runtime.
|
||||||
|
gitea Installs gitea tools like the changelog generator.
|
||||||
|
golang Installs golang 1.19.3.
|
||||||
|
nodejs Installs latest NodeJs LTS version using Volta.
|
||||||
|
volta Installs Volta as NodeJS version manager.
|
||||||
|
powershell Installs latest PowerShell LTS version.
|
||||||
|
|
||||||
|
Example 1: arkanum git setup "my-name" "my-email"
|
||||||
|
Example 2: arkanum install golang
|
||||||
|
Example 3: arkanum config disable-motd
|
||||||
```
|
```
|
||||||
### 📝 Fira Code (NerdFont patched)
|
### 📝 Fira Code (NerdFont patched)
|
||||||
|
|
||||||
@ -233,9 +249,9 @@ following command:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# restart the installation
|
# restart the installation
|
||||||
arkanum --install-extensions
|
arkanum config install-extensions
|
||||||
# Optional: reset the vscode user setting
|
# Optional: reset the vscode user setting
|
||||||
arkanum --reset-codesetting
|
arkanum config reset-codesettings
|
||||||
# Reload with command F1 + Developer: Reload Window
|
# Reload with command F1 + Developer: Reload Window
|
||||||
```
|
```
|
||||||
## 😡 We're Using GitHub Under Protest
|
## 😡 We're Using GitHub Under Protest
|
||||||
|
168
arkanum
168
arkanum
@ -4,26 +4,39 @@ set -e
|
|||||||
|
|
||||||
function showHelp() {
|
function showHelp() {
|
||||||
cat << HELP
|
cat << HELP
|
||||||
🧙 arkanum ✨🌌☄️💥 is used to install optional runtimes for developing in a
|
🧙 arkanum ✨🌌☄️💥 is used to install optional tools for developing in a
|
||||||
code-server container environment.
|
code-server container environment.
|
||||||
|
|
||||||
Syntax: arkanum RUNTIME ...
|
Syntax: arkanum <flags> COMMAND OPTION ARGUMENT
|
||||||
RUNTIME [docker-cli|dotnet|gitea|golang|nodejs|volta|powershell]
|
COMMAND
|
||||||
docker-cli Installs the latest docker-cli.
|
config The config command is used to modify arkanum itself.
|
||||||
dotnet Installs latest LTS dotnet core sdk + runtime.
|
git The git command is a wrapper for git helpers.
|
||||||
gitea Installs gitea tools like the changelog generator.
|
install The install command is used to add different tools
|
||||||
golang Installs golang 1.19.3.
|
help Shows this help text.
|
||||||
nodejs Installs latest NodeJs LTS version using Volta.
|
|
||||||
volta Installs Volta as NodeJS version manager.
|
|
||||||
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.
|
|
||||||
|
|
||||||
Example 1: arkanum dotnet
|
OPTION
|
||||||
Example 2: arkanum golang nodejs
|
config:
|
||||||
Example 3: arkanum --disable-motd
|
disable-motd Disables hint in new bash terminal.
|
||||||
|
install extensions Installs predefined recommended extensions.
|
||||||
|
reset-codesettings Sets VS Code user setting with basic (Fira Code).
|
||||||
|
|
||||||
|
git:
|
||||||
|
setup Takes two arguments to setup the git client:
|
||||||
|
1) Username
|
||||||
|
2) Email address
|
||||||
|
|
||||||
|
install:
|
||||||
|
docker-cli Installs the latest docker-cli.
|
||||||
|
dotnet Installs latest LTS dotnet core sdk + runtime.
|
||||||
|
gitea Installs gitea tools like the changelog generator.
|
||||||
|
golang Installs golang 1.19.3.
|
||||||
|
nodejs Installs latest NodeJs LTS version using Volta.
|
||||||
|
volta Installs Volta as NodeJS version manager.
|
||||||
|
powershell Installs latest PowerShell LTS version.
|
||||||
|
|
||||||
|
Example 1: arkanum git setup "my-name" "my-email"
|
||||||
|
Example 2: arkanum install golang
|
||||||
|
Example 3: arkanum config disable-motd
|
||||||
HELP
|
HELP
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,6 +44,8 @@ function disableMotd() {
|
|||||||
if [[ -e "$HOME/enable_motd" ]]; then
|
if [[ -e "$HOME/enable_motd" ]]; then
|
||||||
say "Disabling 'arkanum' motd..." "disableMotd"
|
say "Disabling 'arkanum' motd..." "disableMotd"
|
||||||
rm -f "$HOME/enable_motd"
|
rm -f "$HOME/enable_motd"
|
||||||
|
else
|
||||||
|
sayW "Arkanum Motd already disabled" "disableMotd"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,23 +139,6 @@ function instGoLang() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function instNodeJs() {
|
function instNodeJs() {
|
||||||
say "Adding nodesource package source (NodeJS LTS)..." "NodeJs"
|
|
||||||
curl -#fSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
|
|
||||||
say "Updating package lists and installing NodeJS LTS..." "NodeJs"
|
|
||||||
sudo -E apt-get install --no-install-recommends -y \
|
|
||||||
nodejs
|
|
||||||
|
|
||||||
say "Cleaning up..." "NodeJs"
|
|
||||||
sudo -E apt-get clean
|
|
||||||
sudo rm -rf \
|
|
||||||
/tmp/* \
|
|
||||||
/var/lib/apt/lists/* \
|
|
||||||
/var/tmp/*
|
|
||||||
|
|
||||||
say "done." "NodeJs"
|
|
||||||
}
|
|
||||||
|
|
||||||
function instNodeJS2() {
|
|
||||||
say "Installing NodeJS LTS via Volta..." "NodeJS"
|
say "Installing NodeJS LTS via Volta..." "NodeJS"
|
||||||
volta install node@lts
|
volta install node@lts
|
||||||
say "done." "NodeJS"
|
say "done." "NodeJS"
|
||||||
@ -149,11 +147,14 @@ function instNodeJS2() {
|
|||||||
function instVolta() {
|
function instVolta() {
|
||||||
say "Installing Volta as NodeJS version manager..." "Volta"
|
say "Installing Volta as NodeJS version manager..." "Volta"
|
||||||
curl -#fSl https://get.volta.sh | bash
|
curl -#fSl https://get.volta.sh | bash
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source ~/.profile
|
||||||
say "done." "Volta"
|
say "done." "Volta"
|
||||||
}
|
}
|
||||||
|
|
||||||
function instPwsh() {
|
function instPwsh() {
|
||||||
say "Installing PowerShell requirements..." "PowerShell"
|
say "Installing PowerShell requirements..." "PowerShell"
|
||||||
|
sudo -E apt-get update > /dev/null
|
||||||
sudo -E apt-get install --no-install-recommends -y \
|
sudo -E apt-get install --no-install-recommends -y \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
software-properties-common
|
software-properties-common
|
||||||
@ -241,51 +242,90 @@ EOF
|
|||||||
say "done." "VSCode"
|
say "done." "VSCode"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setGitConfig() {
|
||||||
|
#echo "function arg counter is; $#"
|
||||||
|
#echo "function args:$@"
|
||||||
|
|
||||||
|
if [[ "$#" != "4" ]]; then
|
||||||
|
sayE "Invalid arguments given. Please provide '<user>' and '<email>'!" "Git"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ -z "$3" ]]; then
|
||||||
|
sayE "Invalid or empty username given!" "Git"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ -z "$4" ]]; then
|
||||||
|
sayE "Invalid or empty email given!" "Git"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
say "Setting global git config..." "Git"
|
||||||
|
git config --global user.name "$3"
|
||||||
|
git config --global user.email "$4"
|
||||||
|
say "Returning global config:" "Git"
|
||||||
|
git config --list --global
|
||||||
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
if [[ "$#" == "0" ]]; then
|
if [[ "$#" == "0" ]]; then
|
||||||
showHelp
|
showHelp
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in "$@"; do
|
# Command filter
|
||||||
if [[ "$1" == "-h" ]]; then
|
if [[ "$1" =~ ^help|-h|--h$ ]]; then
|
||||||
showHelp
|
showHelp
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ "$i" == "docker-cli" ]]; then
|
fi
|
||||||
instDockerCLI
|
|
||||||
elif [[ "$i" == "dotnet" ]]; then
|
# CONFIG command
|
||||||
instDotNet
|
if [[ "$1" == "config" ]]; then
|
||||||
elif [[ "$i" == "golang" ]]; then
|
# disable-motd option
|
||||||
instGoLang "$2"
|
if [[ "$2" == "disable-motd" ]]; then
|
||||||
elif [[ "$i" == "nodejs" ]]; then
|
|
||||||
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
|
|
||||||
instPwsh
|
|
||||||
elif [[ "$i" == "gitea" ]]; then
|
|
||||||
instGiteaTools
|
|
||||||
elif [[ "$i" == "--disable-motd" ]]; then
|
|
||||||
disableMotd
|
disableMotd
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ "$i" == "--install-extensions" ]]; then
|
# install-extensions option
|
||||||
|
elif [[ "$2" == "install-extensions" ]]; then
|
||||||
instCodeExtension
|
instCodeExtension
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ "$i" == "--reset-codesetting" ]]; then
|
# reset-codesetting option
|
||||||
|
elif [[ "$2" == "reset-codesettings" ]]; then
|
||||||
setCodeSettings
|
setCodeSettings
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
sayE "Unknown parameter value given!($i)."
|
sayE "Unknown option ($2) given for command 'config'!"
|
||||||
|
fi
|
||||||
|
# GIT command
|
||||||
|
elif [[ "$1" == "git" ]]; then
|
||||||
|
# setup option
|
||||||
|
if [[ "$2" == "setup" ]]; then
|
||||||
|
setGitConfig "$@"
|
||||||
|
else
|
||||||
|
sayE "Unknown option ($2) given for command 'git'!"
|
||||||
|
fi
|
||||||
|
# INSTALL command
|
||||||
|
elif [[ "$1" == "install" ]]; then
|
||||||
|
# docker-cli option
|
||||||
|
if [[ "$2" == "docker-cli" ]]; then
|
||||||
|
instDockerCLI
|
||||||
|
elif [[ "$2" == "dotnet" ]]; then
|
||||||
|
instDotNet
|
||||||
|
elif [[ "$2" == "golang" ]]; then
|
||||||
|
instGoLang "$3"
|
||||||
|
elif [[ "$2" == "nodejs" ]]; then
|
||||||
|
instVolta
|
||||||
|
instNodeJs
|
||||||
|
elif [[ "$2" == "volta" ]]; then
|
||||||
|
instVolta
|
||||||
|
elif [[ "$2" == "powershell" ]]; then
|
||||||
|
instPwsh
|
||||||
|
elif [[ "$2" == "gitea" ]]; then
|
||||||
|
instGiteaTools
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
sayE "Unknown parameter value given!($1)."
|
||||||
showHelp
|
showHelp
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
@ -1,3 +1,39 @@
|
|||||||
#!/bin/bash
|
#!/bin/env bash
|
||||||
|
|
||||||
complete -W "--disable-motd --install-extensions --reset-codesetting docker-cli dotnet gitea golang nodejs volta powershell -h" arkanum
|
#complete -W "--disable-motd --install-extensions --reset-codesetting docker-cli dotnet gitea golang nodejs volta powershell -h" arkanum
|
||||||
|
|
||||||
|
function _command_completions() {
|
||||||
|
local cur prev
|
||||||
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
|
case ${COMP_CWORD} in
|
||||||
|
1)
|
||||||
|
# shellcheck disable=2207,SC2086
|
||||||
|
COMPREPLY=($(compgen -W "config git install help" -- ${cur}))
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
case ${prev} in
|
||||||
|
config)
|
||||||
|
# shellcheck disable=2207,SC2086
|
||||||
|
COMPREPLY=($(compgen -W "disable-motd install-extensions reset-codesettings" -- ${cur}))
|
||||||
|
;;
|
||||||
|
git)
|
||||||
|
# shellcheck disable=2207,SC2086
|
||||||
|
COMPREPLY=($(compgen -W "setup" -- ${cur}))
|
||||||
|
;;
|
||||||
|
install)
|
||||||
|
# shellcheck disable=2207,SC2086
|
||||||
|
COMPREPLY=($(compgen -W "docker-cli dotnet golang nodejs volta powershell gitea" -- ${cur}))
|
||||||
|
;;
|
||||||
|
help)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=()
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -F _command_completions arkanum
|
||||||
|
Reference in New Issue
Block a user