diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-06-02 13:42:34 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-06-02 18:36:09 +0900 |
commit | 26bd4144f74131a55256cc6073d0c36e1e662736 (patch) | |
tree | 2801741be102ab764b5d5198ace1c71680a77e7d | |
parent | 733c72e6f03673151b9f01923d783e24fb66fb82 (diff) |
Add `nightly` recipe
Installs the last revision in the previous `RUBY_RELEASE_DATE`.
-rw-r--r-- | common.mk | 16 | ||||
-rw-r--r-- | template/Makefile.in | 4 | ||||
-rw-r--r-- | win32/Makefile.sub | 5 |
3 files changed, 25 insertions, 0 deletions
@@ -1887,6 +1887,22 @@ ChangeLog: -e 'VCS.detect(ARGV[0]).export_changelog(path: ARGV[1])' \ "$(srcdir)" $@ +# CAUTION: If using GNU make 3 which does not support `.WAIT`, this +# recipe with multiple jobs makes build and `git reset` run +# simultaneously, and will cause inconsistent results. Run with `-j1` +# or update GNU make. +nightly: yesterday $(DOT_WAIT) install + $(NULLCMD) + +# Rewind to the last commit "yesterday". "Yesterday" means here the +# period where `RUBY_RELEASE_DATE` is the day before the date to be +# generated now. In short, the yesterday in JST-9 time zone. +yesterday: rewindable + +rewindable: + $(GIT) -C $(srcdir) status --porcelain + $(GIT) -C $(srcdir) diff --quiet + HELP_EXTRA_TASKS = "" help: PHONY diff --git a/template/Makefile.in b/template/Makefile.in index 22148e7fea..033ac56cb3 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -687,3 +687,7 @@ yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST) $(RSPECOPTS) spec/syntax_suggest/$(SYNTAX_SUGGEST_SPECS) $(ACTIONS_ENDGROUP) no-test-syntax-suggest: + +yesterday: + $(GIT) -C $(srcdir) reset --hard \ + `$(GIT) -C $(srcdir) log -1 --before=00:00+0900 --format=%H` diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 61cca10857..b125bf5555 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1438,3 +1438,8 @@ rubyspec-capiext: $(RUBYSPEC_CAPIEXT_EXTS) !endif exts: rubyspec-capiext + +yesterday: + for /f "usebackq" %H in \ + (`$(GIT) -C $(srcdir) log -1 "--before=00:00+0900" "--format=%H"`) do \ + $(GIT) -C $(srcdir) reset --hard %%H |