diff --git a/activities/education/education.sources b/activities/education/education.sources index 6c5b250b8a..c38340ad9f 100644 --- a/activities/education/education.sources +++ b/activities/education/education.sources @@ -11,5 +11,6 @@ contact/local:[] news/*/news:[education] news/*/.news:[education] +news/nl/nl:[education] +news/nl/.nl:[education] events/*/event:[education] -d_day:[] diff --git a/at/at.sources b/at/at.sources index 88df3045b2..d50c1a05c5 100644 --- a/at/at.sources +++ b/at/at.sources @@ -7,9 +7,9 @@ about/people/groups:[] about/people/volunteers:[] activities/*/project:[] campaigns/*/project:[] + news/*/news:[at] news/*/.news:[at] news/nl/nl:[at] news/nl/.nl:[at] events/*/event:[at] -d_day:[] diff --git a/build/HELP b/build/HELP index 6df00e7ad2..a346f6a4c6 100644 --- a/build/HELP +++ b/build/HELP @@ -24,12 +24,15 @@ build_main.sh [options] tree_maker [input_dir] "destination_dir" Note: if destination_dir is set via previous options, and only one paramter is given, then this parameter will be interpreted as input_dir -build_main.sh [options] wakeup_news [date] +build_main.sh [options] wakeup [date] News items that are in the future at the time of their commit are not considered for the content of dependent files (e.g. news.html, index.html). This function performs a `touch` on all files which are to be released at the presented date, thus forcing a subsequent buildrun to rebuild dependent files even though the input files may not have changed their content. + The same goes for events which start today (have to be moved from future to + current events) or ended yesterday (have to be moved from current to past + events). The date option defaults to the present date, if given it must adhere to the form YYYY-MM-DD. diff --git a/build/arguments.sh b/build/arguments.sh index 3f8353185c..2d27342cfa 100755 --- a/build/arguments.sh +++ b/build/arguments.sh @@ -48,7 +48,7 @@ if [ -z "$inc_arguments" ]; then [ "$#" -gt 0 ] && shift 1 && workfile="$1" [ "$#" -gt 0 ] && shift 1 && processor="$1" ;; - wakeup_news) + wakeup) command="$1$command" [ "$#" -gt 0 ] && shift 1 && today="$1" ;; @@ -80,7 +80,7 @@ if [ -z "$inc_arguments" ]; then process_file) [ -z "$workfile" ] && die "Need at least input file" ;; build_xmlstream) [ -z "$workfile" ] && die "Missing xhtml file name" ;; tree_maker) [ -z "$target" ] && die "Missing target location" ;; - wakeup_news) true;; + wakeup) true;; *help*) print_help; exit 0 ;; *) die "Urecognised command or no command given" ;; esac diff --git a/build/build_main.sh b/build/build_main.sh index e71d2d75e7..cdac4122f1 100755 --- a/build/build_main.sh +++ b/build/build_main.sh @@ -63,5 +63,5 @@ case "$command" in process_file) process_file "$workfile" "$processor" ;; build_xmlstream) build_xmlstream "$(get_shortname "$workfile")" "$(get_language "$workfile")" ;; tree_maker) tree_maker "$tree" "$target" ;; - wakeup_news) wakeup_news "$today" ;; + wakeup) wakeup "$today" ;; esac diff --git a/build/stirrups.sh b/build/stirrups.sh index e6843ac96d..0fbf39fb09 100755 --- a/build/stirrups.sh +++ b/build/stirrups.sh @@ -2,7 +2,6 @@ inc_stirrups=true [ -z "$inc_misc" ] && . "$basedir/build/misc.sh" -# [ -z "$inc_sources" ] && . "$basedir/build/sources.sh" dir_maker(){ # set up directory tree for output @@ -24,12 +23,23 @@ dir_maker(){ done } -wakeup_news(){ +wakeup(){ # Performs a `touch` on all files which are to be released at the # presented date. today="$1" - find "$basedir" -name '*.xml' \ + # All news with today's date + find "${basedir}/news" -name '*.xml' \ | xargs egrep -l "<[^>]+ date=[\"']${today}[\"'][^>]*>" \ | xargs touch -c 2>&- || true + + # All events which start today + find "${basedir}/events" -name '*.xml' \ + | xargs egrep -l "<[^>]+ start=[\"']${today}[\"'][^>]*>" \ + | xargs touch -c 2>&- || true + + # All events which ended yesterday + find "${basedir}/events" -name '*.xml' \ + | xargs egrep -l "<[^>]+ end=[\"']$(date -d "${today} -1 day" +%F)[\"'][^>]*>" \ + | xargs touch -c 2>&- || true } diff --git a/de/de.sources b/de/de.sources index 4e28f0a5e9..3f089e68af 100644 --- a/de/de.sources +++ b/de/de.sources @@ -7,9 +7,9 @@ about/people/groups:[] about/people/volunteers:[] activities/*/project:[] campaigns/*/project:[] + news/*/news:[de] news/*/.news:[de] news/nl/nl:[de] news/nl/.nl:[de] events/*/event:[de] -d_day:[] diff --git a/ee/ee.sources b/ee/ee.sources index 8d048f86eb..81c9ecdca1 100644 --- a/ee/ee.sources +++ b/ee/ee.sources @@ -7,9 +7,9 @@ about/people/groups:[] about/people/volunteers:[] activities/*/project:[] campaigns/*/project:[] + news/*/news:[ee] news/*/.news:[ee] news/nl/nl:[ee] news/nl/.nl:[ee] events/*/event:[ee] -d_day:[] diff --git a/events/events.sources b/events/events.sources index d27993808a..6b298dd765 100644 --- a/events/events.sources +++ b/events/events.sources @@ -1,3 +1,2 @@ events/*/event:[] events/*/*/event:[] -d_day:[] diff --git a/fellowship/index.sources b/fellowship/index.sources index b7d0391282..f471fd295e 100644 --- a/fellowship/index.sources +++ b/fellowship/index.sources @@ -1,2 +1 @@ events/*/event:[fellowship] -d_day:[] diff --git a/fi/fi.sources b/fi/fi.sources index 663cf73847..0dc418c95a 100644 --- a/fi/fi.sources +++ b/fi/fi.sources @@ -7,9 +7,9 @@ about/people/groups:[] about/people/volunteers:[] activities/*/project:[] campaigns/*/project:[] + news/*/news:[fi] news/*/.news:[fi] news/nl/nl:[fi] news/nl/.nl:[fi] events/*/event:[fi] -d_day:[] diff --git a/fr/fr.sources b/fr/fr.sources index 7d8995aabb..cdfb72157a 100644 --- a/fr/fr.sources +++ b/fr/fr.sources @@ -9,9 +9,9 @@ about/people/volunteers:[] activities/*/project:[] campaigns/*/project:[] contact/local:[] + news/*/news:[fr] news/*/.news:[fr] news/nl/nl:[fr] news/nl/.nl:[fr] events/*/event:[fr] -d_day:[] diff --git a/index.sources b/index.sources index 348f2575dc..40d2e9f75a 100644 --- a/index.sources +++ b/index.sources @@ -2,5 +2,4 @@ news/2019/news:[frontpage] news/2019/.news:[frontpage] events/2019/event:[frontpage] tools/frontpage/:[] -d_day:[] tools/static-elements/element-:[] diff --git a/it/it.sources b/it/it.sources index 2ba4c38dce..efac40bd73 100644 --- a/it/it.sources +++ b/it/it.sources @@ -8,6 +8,7 @@ about/people/volunteers:[] activities/*/project:[] campaigns/*/project:[] contact/local:[] + news/*/news:[it] news/*/.news:[it] news/nl/nl:[it] diff --git a/uk/uk.sources b/uk/uk.sources index dfb3b01155..38a9799ac5 100644 --- a/uk/uk.sources +++ b/uk/uk.sources @@ -8,9 +8,9 @@ about/people/volunteers:[] activities/*/project:[] campaigns/*/project:[] contact/local:[] + news/*/news:[gb] news/*/.news:[gb] news/nl/nl:[gb] news/nl/.nl:[gb] events/*/event:[gb] -d_day:[]