From: Richard W.M. Jones Date: Wed, 9 Oct 2013 12:07:10 +0000 (+0100) Subject: Remove NOTES file, no longer up to date. X-Git-Tag: 0.2~4 X-Git-Url: http://git.annexia.org/?p=goaljobs.git;a=commitdiff_plain;h=3d473620d4474b9c968997e7786006f6ef4ee960 Remove NOTES file, no longer up to date. --- diff --git a/NOTES b/NOTES deleted file mode 100644 index 28ca33d..0000000 --- a/NOTES +++ /dev/null @@ -1,91 +0,0 @@ -## NB ## - -These notes reflect earlier thinking about the language and may not -necessarily accurately describe the current goaljobs language. Please -read the documentation instead. - -## NB ## - -Like 'make' except: - - Predicates can be based on arbitrary expressions, not just - "file X is older than file Y". - - Rules are more flexible and encourage structuring and reuse - through functions. - - Goals can be parameterized. - - Program can run continuously to implement business rules. - -Differences from 'whenjobs': - - Goals instead of variables. - - Persistent (across session) variables exist, but are not central. - - Doesn't use <<..>> for shell scripts (has a function 'sh' instead). - - No daemon. - -Similarities to 'whenjobs': - - Each shell script runs in its own temporary directory. - -Example program: - - let package = "foo" - - let rec goal website_updated version = - let tarfile = sprintf "%s-%s.tar.gz" package version in - let tarpath = getenv "HOME" // "html" // tarfile in - let url = sprintf "http://example.com/%s" tarfile in - - target (url_exists url); - - require (tarball_exists version); - require (tarball_tested version); - - sh "rsync %s example.com:/html/" tarpath - - and goal tarball_tested version = - let tarfile = sprintf "%s-%s.tar.gz" package version in - let tarpath = getenv "HOME" // "html" // tarfile in - let memkey = package ^ "_tested_" ^ version in - - target (memory_exists memkey); - - require (tarball_exists version); - - sh " - tar zxf %s - cd %s-%s - ./configure - make - make check - " tarpath package version; - - memory_set memkey "1" - - and goal tarball_exists version = - let tarpath = getenv "HOME" // "html" // tarfile in - target (file_exists tarpath); - sh " - cd $HOME/repos/%s - git fetch - git archive --prefix %s-%s/ v%s | gzip > %s-t - mv %s-t %s - " package package version version tarpath tarpath tarpath - - every 1 hour = - let version = shout " - cd $HOME/repos/%s - git fetch - git describe --tags --abbrev=0 --match='v*' - " package in - require (website_updated version) - -This compiles down to a command line program that can be used like this: - - ./compile [-flags] [goals] - -The goals are not enabled automatically. You have to do something -(simple) to publish a goal and specify how command line arguments get -mapped to goal arguments, since the mapping is not likely to be 1-1 -strings. In the end you can do stuff like: - - ./compile all - ./compile clean - ./compile build program # program is a parameter - ./compile -my-flag # custom flags can be defined