cmd
This commit is contained in:
parent
c1aad03c68
commit
71cd517840
8 changed files with 2 additions and 2 deletions
1
cmd/cd-browse-workspace.sh
Executable file
1
cmd/cd-browse-workspace.sh
Executable file
|
@ -0,0 +1 @@
|
|||
tree -a "${GITHUB_WORKSPACE}"
|
7
cmd/cd-build-project.sh
Executable file
7
cmd/cd-build-project.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
if [ -x './build.py' ] ; then
|
||||
./build.py
|
||||
elif [ -x './build.sh' ] ; then
|
||||
./build.sh
|
||||
else
|
||||
exit
|
||||
fi
|
8
cmd/cd-clone-branch.sh
Executable file
8
cmd/cd-clone-branch.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
git clone \
|
||||
--branch "${GITHUB_REF_NAME}" \
|
||||
-- \
|
||||
"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" \
|
||||
'.'
|
||||
|
||||
rm --force --recursive \
|
||||
'.git' '.gitignore'
|
15
cmd/cd-clone-python.sh
Executable file
15
cmd/cd-clone-python.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
[ "${1}" ] && REPOSITORY_FULL="${1}" || exit
|
||||
REPOSITORY_NAME="$(basename ${REPOSITORY_FULL})"
|
||||
|
||||
REPOSITORY_TEMP="$(mktemp --directory)"
|
||||
|
||||
git clone \
|
||||
-- \
|
||||
"${GITHUB_SERVER_URL}/${REPOSITORY_FULL}" \
|
||||
"${REPOSITORY_TEMP}"
|
||||
|
||||
mv "${REPOSITORY_TEMP}/${REPOSITORY_NAME}" \
|
||||
/usr/local/lib/python3.*/dist-packages/
|
||||
|
||||
rm --force --recursive \
|
||||
"${REPOSITORY_TEMP}"
|
1
cmd/cd-install-packages.sh
Executable file
1
cmd/cd-install-packages.sh
Executable file
|
@ -0,0 +1 @@
|
|||
apt-get install --yes "${@}"
|
2
cmd/cd-list-environment.sh
Executable file
2
cmd/cd-list-environment.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
unset TOP_SECRET
|
||||
env | sort
|
23
cmd/cd-synchronize.sh
Executable file
23
cmd/cd-synchronize.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
[ "${1}" ] && SYNC_SOURCE="${1}" || exit
|
||||
|
||||
SYNC_USER='cd'
|
||||
|
||||
[ "${GITHUB_SERVER_URL}" ] \
|
||||
&& SYNC_HOST="$(basename ${GITHUB_SERVER_URL})" || exit
|
||||
|
||||
[ "${SYNC_USER}" ] \
|
||||
&& SYNC_ROOT="/${SYNC_USER}" || exit
|
||||
[ "${GITHUB_REF_NAME}" ] \
|
||||
&& SYNC_ROOT="${SYNC_ROOT}/${GITHUB_REF_NAME}" || exit
|
||||
[ "${GITHUB_REPOSITORY}" ] \
|
||||
&& SYNC_ROOT="${SYNC_ROOT}/${GITHUB_REPOSITORY}" || exit
|
||||
|
||||
SYNC_TARGET="${SYNC_USER}@${SYNC_HOST}:${SYNC_ROOT}"
|
||||
[ "${2}" ] && SYNC_TARGET="${SYNC_TARGET}/${2}"
|
||||
|
||||
rsync \
|
||||
--archive \
|
||||
--delete-before \
|
||||
--verbose \
|
||||
"${SYNC_SOURCE}/" \
|
||||
"${SYNC_TARGET}/"
|
Loading…
Add table
Add a link
Reference in a new issue