Skip to content

Commit 19858e7

Browse files
campisanoentaksijcormier
authored andcommitted
functions: Fix fetch commits cron job
Drop 2.x support as we no longer need it Fixes: #599 Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
1 parent ef4fe09 commit 19858e7

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

assets/runtime/functions

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -595,18 +595,7 @@ redmine_configure_fetch_commits() {
595595
crontab -u ${REDMINE_USER} -l >/tmp/cron.${REDMINE_USER}
596596
if ! grep -q 'Repository.fetch_changesets' /tmp/cron.${REDMINE_USER}; then
597597
echo "Configuring redmine::fetch_commits..."
598-
case ${REDMINE_VERSION} in
599-
2.*)
600-
echo "@${REDMINE_FETCH_COMMITS} cd ${REDMINE_HOME}/redmine && ./script/rails runner \"Repository.fetch_changesets\" -e ${RAILS_ENV} >> ${REDMINE_LOG_DIR}/redmine/cron_rake.log 2>&1" >>/tmp/cron.${REDMINE_USER}
601-
;;
602-
3.*|4.*|5.*)
603-
echo "@${REDMINE_FETCH_COMMITS} cd ${REDMINE_HOME}/redmine && ./bin/rails runner \"Repository.fetch_changesets\" -e ${RAILS_ENV} >> ${REDMINE_LOG_DIR}/redmine/cron_rake.log 2>&1" >>/tmp/cron.${REDMINE_USER}
604-
;;
605-
*)
606-
echo "ERROR: Unsupported Redmine version (${REDMINE_VERSION})"
607-
return 1
608-
;;
609-
esac
598+
echo "@${REDMINE_FETCH_COMMITS} cd ${REDMINE_HOME}/redmine && ./bin/rails runner \"Repository.fetch_changesets\" -e ${RAILS_ENV} >> ${REDMINE_LOG_DIR}/redmine/cron_rake.log 2>&1" >>/tmp/cron.${REDMINE_USER}
610599
crontab -u ${REDMINE_USER} /tmp/cron.${REDMINE_USER}
611600
fi
612601
rm -rf /tmp/cron.${REDMINE_USER}

0 commit comments

Comments
 (0)