vn-docker/redmine/update-repositories.sh

13 lines
345 B
Bash
Executable File

#!/bin/bash
GIT_SYNC_FOLDER="/var/local/redmine/repositories"
for REPO_DIR in "$GIT_SYNC_FOLDER/"*; do
if [ -d "$REPO_DIR" ] && [[ "$REPO_DIR" =~ ^.+\.git$ ]]; then
echo "Fetching $REPO_DIR"
(cd "$REPO_DIR" && git remote update --prune) >> /dev/null
fi
done
/usr/src/redmine/bin/rails runner "Repository.fetch_changesets" -e production