Format, license, distribution script

This commit is contained in:
Jörn-Michael Miehe 2020-08-21 00:04:26 +02:00
parent 96d4253fb3
commit 4407899fbb
3 changed files with 70 additions and 49 deletions

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Jörn-Michael Miehe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

26
kiwi
View file

@ -58,7 +58,7 @@ fi
##########
for dep in "${KIWI_DEPS[@]}"; do
if ! command -v "${dep}" &> /dev/null; then
if ! command -v "${dep}" &>/dev/null; then
echo "Dependency '${dep}' not found, please install!"
exit 1
fi
@ -82,24 +82,23 @@ if [ ! -x "$(kiwi_executable)" ]; then
### TODO: post-release version ###
# # switch to temp dir
# workdir=$(pwd)
# tmpdir=$(mktemp -d)
# cd "${tmpdir}"
# cd "${tmpdir}" || :
# # download archive
# wget "${KIWI_REPO}/archive/${KIWI_VERSION}.zip"
# unzip "${KIWI_VERSION}.zip"
# # read archive version tag
# cd "kiwi-config-${KIWI_VERSION}"
# export KIWI_VERSION=$(cat ./version-tag)
# cd "kiwi-config-${KIWI_VERSION}" || :
# KIWI_VERSION=$(cat "./src/${KIWI_VERSION_TAG}")
# # install archive
# mkdir -p "${KIWI_BASEDIR}"
# mv ./src "${KIWI_BASEDIR}/${KIWI_VERSION}"
# mkdir -p "$(kiwi_installdir)"
# mv "src" "Pipfile" "Pipfile.lock" "$(kiwi_installdir)/"
# # discard temp dir
# cd "${workdir}"
# cd "${WORKDIR}" || :
# rm -rf "${tmpdir}"
# echo "OK"
@ -107,7 +106,7 @@ if [ ! -x "$(kiwi_executable)" ]; then
### pre-release version ###
# use this directory as archive
cd "$(dirname "$(readlink -f "${0}")")" ||:
cd "$(dirname "$(readlink -f "${0}")")" || :
# read this version tag
KIWI_VERSION=$(cat "./src/${KIWI_VERSION_TAG}")
@ -125,22 +124,23 @@ if [ ! -x "$(kiwi_executable)" ]; then
fi
# check virtualenv
cd "$(kiwi_installdir)" ||:
if ! pipenv --venv &> /dev/null; then
cd "$(kiwi_installdir)" || :
if ! pipenv --venv &>/dev/null; then
# install virtualenv
echo -n "Preparing virtualenv ... "
pipenv sync &> /dev/null
pipenv sync &>/dev/null
echo "OK"
fi
# go back to the original work directory
cd "${WORKDIR}" ||:
cd "${WORKDIR}" || :
# setup main environment
KIWI_ROOT="$(kiwi_root)"
export KIWI_ROOT
export KIWI_CONF_NAME
export PIPENV_VERBOSITY=-1
# run main script
exec pipenv run "$(kiwi_executable)" "${@}"

View file

@ -1,8 +1,8 @@
kiwi-config is the tool for container server management.
Features:
- Group your services into projects using their own docker-compose.yml
- Bind to file system by using ${TARGETDIR} as volume in docker-compose.yml
- Group services into projects using their own docker-compose.yml
- Bind to the local file system by using ${TARGETDIR} as volume in docker-compose.yml
- Add instance-global config files by using ${CONFDIR} as volume in docker-compose.yml
- Add instance-global custom values inside docker-compose.yml using config:runtime:env
- Build service-specific, private docker images from Dockerfiles