Compare commits
No commits in common. "dfa9fc1a7ac84818f0e723b92e8525db842552b6" and "aac5ad09d85323f8ea441070c3030ccb6ac18dab" have entirely different histories.
dfa9fc1a7a
...
aac5ad09d8
4 changed files with 31 additions and 41 deletions
|
@ -8,7 +8,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -24,7 +24,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -40,7 +40,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -56,7 +56,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -72,7 +72,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -88,7 +88,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -104,7 +104,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -120,7 +120,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
|
|
@ -8,7 +8,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -24,7 +24,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -40,7 +40,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -58,7 +58,7 @@ jobs:
|
|||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_SSH_HOSTS: ${{vars.SPCD_SSH_HOSTS}}
|
||||
SPCD_SSH_KEY: ${{secrets.SPCD_SSH_KEY}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -75,7 +75,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -91,7 +91,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -107,7 +107,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
@ -123,7 +123,7 @@ jobs:
|
|||
- name: spcd
|
||||
env:
|
||||
SPCD: ${{vars.SPCD}}
|
||||
SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}}
|
||||
SPCD_TXT_LANGUAGE: ${{vars.SPCD_TXT_LANGUAGE}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-check-project
|
||||
|
|
|
@ -135,7 +135,6 @@ Handle project workflows in a unified way:
|
|||
| SPCD_REF_STAGING | Staging deployment ref | dev |
|
||||
| SPCD_SSH_HOSTS | domain.tld ssh-type pub | |
|
||||
| SPCD_SSH_KEY | SSH private key | |
|
||||
| SPCD_TXT_LOCALE | Locale to use for text | en_US |
|
||||
| SPCD_URL_ALMA | Alma repository URL | https://repo.almalinux.org |
|
||||
| SPCD_URL_ALPINE | Alpine repository URL | https://dl-cdn.alpinelinux.org |
|
||||
| SPCD_URL_ARCH | Arch repository URL | https://geo.mirror.pkgbuild.com |
|
||||
|
|
|
@ -177,12 +177,12 @@ _spcd_step_wipe() {
|
|||
# ╰───┴─────╯
|
||||
|
||||
_SPCD_TXT_CHARSET="UTF-8"
|
||||
_SPCD_TXT_LOCALE_DEFAULT="C"
|
||||
_SPCD_TXT_LANGUAGE_DEFAULT="C"
|
||||
|
||||
_spcd_txt_pick() {
|
||||
case "${SPCD_TXT_LOCALE}" in
|
||||
"${SPCD_TXT_LOCALE_ENGLISH}") echo "${1}" ;;
|
||||
"${SPCD_TXT_LOCALE_FRENCH}") echo "${2}" ;;
|
||||
case "${SPCD_TXT_LANGUAGE}" in
|
||||
"${SPCD_TXT_LANGUAGE_ENGLISH}") echo "${1}" ;;
|
||||
"${SPCD_TXT_LANGUAGE_FRENCH}") echo "${2}" ;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
@ -322,8 +322,8 @@ spcd_step_out() {
|
|||
# │ functions │ txt │
|
||||
# ╰───────────┴─────╯
|
||||
|
||||
SPCD_TXT_LOCALE_ENGLISH="en_US"
|
||||
SPCD_TXT_LOCALE_FRENCH="fr_FR"
|
||||
SPCD_TXT_LANGUAGE_ENGLISH="en_US"
|
||||
SPCD_TXT_LANGUAGE_FRENCH="fr_FR"
|
||||
|
||||
spcd_txt_get() {
|
||||
case "${1}" in
|
||||
|
@ -337,7 +337,7 @@ spcd_txt_locale() {
|
|||
if [ -n "${1}" ]; then
|
||||
spcd_step__locale__value="${1}"
|
||||
else
|
||||
spcd_step__locale__value="${_SPCD_TXT_LOCALE_DEFAULT}"
|
||||
spcd_step__locale__value="${_SPCD_TXT_LANGUAGE_DEFAULT}"
|
||||
fi
|
||||
spcd_step__locale__value="${spcd_step__locale__value}.${_SPCD_TXT_CHARSET}"
|
||||
set -- \
|
||||
|
@ -397,7 +397,7 @@ spcd_step__environment_defaults_print() {
|
|||
"REF_FEATURE" \
|
||||
"REF_RELEASE" \
|
||||
"REF_STAGING" \
|
||||
"TXT_LOCALE" \
|
||||
"TXT_LANGUAGE" \
|
||||
"URL_ALMA" \
|
||||
"URL_ALPINE" \
|
||||
"URL_ARCH" \
|
||||
|
@ -432,8 +432,8 @@ spcd_step__environment_defaults_set() {
|
|||
[ -n "${SPCD_REF_RELEASE}" ] || SPCD_REF_RELEASE="main"
|
||||
[ -n "${SPCD_REF_STAGING}" ] || SPCD_REF_STAGING="dev"
|
||||
|
||||
[ -n "${SPCD_TXT_LOCALE}" ] ||
|
||||
SPCD_TXT_LOCALE="${SPCD_TXT_LOCALE_ENGLISH}"
|
||||
[ -n "${SPCD_TXT_LANGUAGE}" ] ||
|
||||
SPCD_TXT_LANGUAGE="${SPCD_TXT_LANGUAGE_ENGLISH}"
|
||||
|
||||
[ -n "${SPCD_URL_ALMA}" ] ||
|
||||
# /almalinux/$releasever/…
|
||||
|
@ -464,8 +464,7 @@ spcd_step__environment_defaults_set() {
|
|||
# /update/…
|
||||
SPCD_URL_OPENSUSE="https://download.opensuse.org"
|
||||
[ -n "${SPCD_URL_PYTHON}" ] ||
|
||||
# /simple
|
||||
SPCD_URL_PYTHON="https://pypi.org"
|
||||
SPCD_URL_PYTHON="https://pypi.org/simple"
|
||||
[ -n "${SPCD_URL_ROCKY}" ] ||
|
||||
# /$contentdir/$releasever/…
|
||||
SPCD_URL_ROCKY="https://dl.rockylinux.org"
|
||||
|
@ -1163,8 +1162,8 @@ spcd_step__packages_verify_https() {
|
|||
spcd_step__packages_install_locales() {
|
||||
spcd_step "Install locales"
|
||||
set -- \
|
||||
"${SPCD_TXT_LOCALE_ENGLISH}" \
|
||||
"${SPCD_TXT_LOCALE_FRENCH}"
|
||||
"${SPCD_TXT_LANGUAGE_ENGLISH}" \
|
||||
"${SPCD_TXT_LANGUAGE_FRENCH}"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_APK}") spcd_install_package "musl-locales" ;;
|
||||
"${SPCD_PM_APT}")
|
||||
|
@ -1189,7 +1188,7 @@ ${spcd_step__pil__locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
|
|||
"${SPCD_PM_ZYPPER}") spcd_install_package "glibc-locale" ;;
|
||||
*) ;;
|
||||
esac
|
||||
spcd_txt_locale "${SPCD_TXT_LOCALE}"
|
||||
spcd_txt_locale "${SPCD_TXT_LANGUAGE}"
|
||||
}
|
||||
|
||||
spcd_step__packages_upgrade_system() {
|
||||
|
@ -1235,7 +1234,7 @@ spcd_step__python_install() {
|
|||
spcd_step "Configure PIP"
|
||||
spcd_os_write "/etc/pip.conf" "\
|
||||
[global]
|
||||
index-url = ${SPCD_URL_PYTHON}/simple
|
||||
index-url = ${SPCD_URL_PYTHON}
|
||||
"
|
||||
spcd_step "Create"
|
||||
"${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_PYTHON_VENV}"
|
||||
|
@ -1385,15 +1384,7 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
|
|||
# │ main │
|
||||
# ╰──────╯
|
||||
|
||||
spcd_test_local() {
|
||||
local local_variable="KO!"
|
||||
non_local_variable="OK"
|
||||
}
|
||||
|
||||
spcd_main() {
|
||||
spcd_test_local
|
||||
echo "local_variable = \"${local_variable}\""
|
||||
echo "non_local_variable = \"${non_local_variable}\""
|
||||
# environment
|
||||
spcd_txt_locale
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue