Skip to content

Instantly share code, notes, and snippets.

@gchiu
Last active July 29, 2017 00:32
Show Gist options
  • Save gchiu/075f4fd97b8439a34a161738c0879cb1 to your computer and use it in GitHub Desktop.
Save gchiu/075f4fd97b8439a34a161738c0879cb1 to your computer and use it in GitHub Desktop.
require commit
rebol [
commit: [
id: "8f0b227bd6a93a8a8105ab5de5cdc0e6ec103034"
date: 29-July-2017 ; only include if you want to fail older builds
]
]
require-commit: procedure [
"checks current commit against required commit"
commit [string!]
][
if find system/script/header 'commit [
c: :system/script/header/commit
if all [
find? c 'date
date: :c/date
rebol/build < date
][
fail ["This script needs a build newer or equal to" date "so run `upgrade`"]
]
if all [
find? c 'id
id: :c/id
id <> commit
][
print ["This script has only been tested again commit" id |
"If it doesn't run as expected you can try seeing if this commit is still available" |
unspaced ["by using the `do <dl-renc>` tool and look for r3-" copy/part id 7 "*"
if find/last form rebol/version "0.3.4" [%.exe]]
]
]
]
]
require-commit "8f0b227bd6a93a8a8105ab5de5cdc0e6ec10303"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment