Release 0.3.0-alpha.1 #164

Merged
Jef Roosens merged 78 commits from release-0.3.0-alpha.1 into main 2022-05-06 20:12:52 +02:00
3 changed files with 8 additions and 0 deletions
Showing only changes of commit 5ce431aa4a - Show all commits

View file

@ -12,6 +12,7 @@ pub:
base_image string = 'archlinux:base-devel' base_image string = 'archlinux:base-devel'
} }
// cmd returns the cli module that handles the cron daemon.
pub fn cmd() cli.Command { pub fn cmd() cli.Command {
return cli.Command{ return cli.Command{
name: 'cron' name: 'cron'

View file

@ -12,6 +12,7 @@ fn (r1 ScheduledBuild) < (r2 ScheduledBuild) bool {
return r1.timestamp < r2.timestamp return r1.timestamp < r2.timestamp
} }
// cron starts a cron daemon & starts periodically scheduling builds.
pub fn cron(conf Config) ? { pub fn cron(conf Config) ? {
ce := parse_expression('0 3') ? ce := parse_expression('0 3') ?
t := time.parse('2002-01-01 00:00:00') ? t := time.parse('2002-01-01 00:00:00') ?

View file

@ -25,4 +25,10 @@ fn test_next_simple() ? {
util_test_time('0 3', '2002-01-01 04:00:00', '2002-01-02 03:00:00') ? util_test_time('0 3', '2002-01-01 04:00:00', '2002-01-02 03:00:00') ?
util_test_time('0 3/4', '2002-01-01 04:00:00', '2002-01-01 07:00:00') ? util_test_time('0 3/4', '2002-01-01 04:00:00', '2002-01-01 07:00:00') ?
// Overlap to next month
util_test_time('0 3', '2002-11-31 04:00:00', '2002-12-01 03:00:00') ?
// Overlap to next year
util_test_time('0 3', '2002-12-31 04:00:00', '2003-01-01 03:00:00') ?
} }