−write
Some checks failed
/ job (push) Failing after 7s

This commit is contained in:
Marc Beninca 2024-04-27 20:40:44 +02:00
parent 825475a606
commit 13c474f39a
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

18
cd.sh
View file

@ -4,7 +4,6 @@ set 'cd' 'rwx'
cd_main () { cd_main () {
cd_set_environment cd_set_environment
cd_write_environment
cd_set_dns_resolving \ cd_set_dns_resolving \
'9.9.9.9' '9.9.9.9'
cd_set_packages_repositories cd_set_packages_repositories
@ -25,7 +24,6 @@ cd_main () {
cd_set_environment () { cd_set_environment () {
CD_DNS_FILE='/etc/resolv.conf' CD_DNS_FILE='/etc/resolv.conf'
CD_ENV="$(mktemp)"
case "${CD_OS_NAME}" in case "${CD_OS_NAME}" in
'debian') 'debian')
CD_PYTHON_COMMAND='python3' CD_PYTHON_COMMAND='python3'
@ -83,22 +81,6 @@ cd_set_environment () {
CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}" CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}"
} }
cd_write_environment () {
cd_write "${CD_ENV}" "{
\"project\": {
\"branch\": \"${CD_PROJECT_BRANCH}\",
\"name\": \"${CD_PROJECT_NAME}\",
\"url\": \"${CD_PROJECT_URL}\"
},
\"projects\": {
\"group\": \"${CD_PROJECTS_GROUP}\",
\"url\": \"${CD_PROJECTS_URL}\"
}
}
"
cat "${CD_ENV}"
}
cd_step () { cd_step () {
if [ "${1}" ] ; then if [ "${1}" ] ; then
CD_STEP=$((CD_STEP+1)) CD_STEP=$((CD_STEP+1))