feat: Refactor script copying to use loops for optional files in release bundle
This commit is contained in:
@@ -283,19 +283,19 @@ jobs:
|
|||||||
redis_data:
|
redis_data:
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cp start.sh release-bundle/start.sh
|
# Copy runtime scripts and config if present
|
||||||
cp stop.sh release-bundle/stop.sh
|
for f in start.sh stop.sh restart.sh backup.sh config.json update.sh; do
|
||||||
cp restart.sh release-bundle/restart.sh
|
if [ -f "$f" ]; then
|
||||||
cp backup.sh release-bundle/backup.sh
|
cp "$f" "release-bundle/$(basename "$f")"
|
||||||
cp config.json release-bundle/config.json
|
fi
|
||||||
cp update.sh release-bundle/update.sh
|
done
|
||||||
|
|
||||||
# Multitenant scripts & docs
|
# Multitenant scripts & docs (optional)
|
||||||
cp docker-compose-multitenant.yml release-bundle/docker-compose-multitenant.yml
|
for f in docker-compose-multitenant.yml manage-tenant.sh run-tenant-cmd.sh MULTITENANT_DEPLOYMENT.md MULTITENANT_PYTHON_API.md; do
|
||||||
cp manage-tenant.sh release-bundle/manage-tenant.sh
|
if [ -f "$f" ]; then
|
||||||
cp run-tenant-cmd.sh release-bundle/run-tenant-cmd.sh
|
cp "$f" "release-bundle/$(basename "$f")"
|
||||||
cp MULTITENANT_DEPLOYMENT.md release-bundle/MULTITENANT_DEPLOYMENT.md
|
fi
|
||||||
cp MULTITENANT_PYTHON_API.md release-bundle/MULTITENANT_PYTHON_API.md
|
done
|
||||||
|
|
||||||
# Include optional development image tar and helper note
|
# Include optional development image tar and helper note
|
||||||
if [ -f "inventarsystem-image-development.tar.gz" ]; then
|
if [ -f "inventarsystem-image-development.tar.gz" ]; then
|
||||||
@@ -311,7 +311,8 @@ jobs:
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chmod +x release-bundle/start.sh release-bundle/stop.sh release-bundle/restart.sh release-bundle/backup.sh release-bundle/update.sh release-bundle/manage-tenant.sh release-bundle/run-tenant-cmd.sh
|
# Make any shipped scripts executable
|
||||||
|
find release-bundle -maxdepth 1 -type f -name '*.sh' -exec chmod +x {} \; || true
|
||||||
tar -czf inventarsystem-docker-bundle.tar.gz -C release-bundle .
|
tar -czf inventarsystem-docker-bundle.tar.gz -C release-bundle .
|
||||||
|
|
||||||
- name: Create or update GitHub Release
|
- name: Create or update GitHub Release
|
||||||
|
|||||||
Reference in New Issue
Block a user