Compare commits

..

No commits in common. "beaf1377f9ae9c2ee7e594499cb85218512cee50" and "ed7daae3f864d433359863673b2115b1a0be3ade" have entirely different histories.

4 changed files with 6 additions and 18 deletions

6
cd.sh
View file

@ -4,7 +4,7 @@ CD_DNS_SERVERS=(
'9.9.9.9'
)
CD_NAME='cd'
CD_PROJECTS_PARENT='rwx'
CD_REPOSITORIES_PARENT='rwx'
function cd_set_environment {
CD_DNS_FILE='/etc/resolv.conf'
@ -235,7 +235,7 @@ local root
cd_step "${FUNCNAME}"
root="$(mktemp --directory)" || exit
for repository in \
"${CD_PROJECTS_PARENT}" \
"${CD_REPOSITORIES_PARENT}" \
"${CD_NAME}" \
; do
git clone \
@ -250,7 +250,7 @@ local root
function cd_bootstrap {
cd_step "${FUNCNAME}"
"${CD_PYTHON_COMMAND}" -m "${CD_NAME}"
"${CD_PYTHON_COMMAND}" -m "${CD_NAME}" "${CD_ENV}"
}
function cd_main {

View file

@ -1,28 +1,22 @@
import os
from cd.project import Project
from cd.projects import Projects
from rwx import ps
COMMANDS_PREFIX = 'cd-'
environment = sorted(os.environ.items())
project = Project()
projects = Projects(environment)
def cd_clone_branch():
ps.run('git',
'clone',
'--branch', project.branch,
'--branch', os.environ['CD_PROJECT_BRANCH'],
'--',
project.url,
os.environ['CD_PROJECT_URL'],
'.',
)
def cd_list_environment():
for variable, value in environment:
for variable, value in sorted(os.environ.items()):
print(variable, '=', value)

View file

@ -1,3 +0,0 @@
class Project:
def __init__(self):
pass

View file

@ -1,3 +0,0 @@
class Projects:
def __init__(self, environment):
self.env = environment