Newer
Older
#!/bin/bash
echo "Deploy module and CLI in RCM environment"
# Get the current version
version=$(git describe --tags)
# Copy Python module
ipath=/home/operateur/.local/lib/python3.6/site-packages/FofbTool
mkdir -p $ipath
cp FofbTool/*.py $ipath/ -rvf
cp bin/FofbTool /home/production/scripts/DG/python/bin/ -vf
chmod +x /home/production/scripts/DG/python/bin/FofbTool
# AWK the __init__.py file to replace the version variable
awk -v version="$version" '{ gsub("AUTOVERSIONREPLACE",version) ; print}' FofbTool/__init__.py > $ipath/__init__.py