89 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
4e6946bda7
Assign the result of format_changelog to the changelog writer
Also, rename `format_changelog` to `changelog_formatter` since this
method does not format the changelog when called, but rather returns a
Proc that takes IO and writes the formatted changelog.
2025-04-22 21:02:29 +09:00
Hiroshi SHIBATA
8bf14b048f SVN repository is already retired 2025-04-19 06:33:10 +09:00
Nobuyoshi Nakada
64eba7a01a
Ignore broken git work directory at creating revision.h [ci skip] 2025-02-17 18:25:07 +09:00
Nobuyoshi Nakada
e937878883
Revert "Update revision.h if branch unmatch not only revision"
This reverts commit 5a332940ed2f809cb17af7e4d068089b6e1fa6ca.
Something does not work well on Github Actions.
2024-05-09 01:02:59 +09:00
Nobuyoshi Nakada
5a332940ed
Update revision.h if branch unmatch not only revision [ci skip] 2024-05-08 21:39:32 +09:00
Nobuyoshi Nakada
3c4d0b1313
Exclude .mailmap from snapshots [ci skip]
It is only for old commits, useless without full repository logs.
2024-02-25 19:12:55 +09:00
Nobuyoshi Nakada
67026af146
Exclude [ci skip] commits from ChangeLog 2023-12-28 15:01:25 +09:00
Nobuyoshi Nakada
606f7540ee
Exclude dependabot from ChangeLog [ci skip] 2023-12-28 15:01:24 +09:00
Nobuyoshi Nakada
10379ebf90
Support regexp in log-fix [ci skip] 2023-10-03 22:02:02 +09:00
Nobuyoshi Nakada
d80002c902
Improve VCS::GIT#format_changelog addessing [ci skip] 2023-09-23 16:34:20 +09:00
Nobuyoshi Nakada
c8d0470bb0
Use File::NULL instead of hard coded null device names 2023-07-10 19:21:47 +09:00
Nobuyoshi Nakada
849087ccb1
Apply zone offset to the last modified time 2023-02-13 15:12:14 +09:00
Nobuyoshi Nakada
aa8c6759ee
vcs.rb: do not reference the constant before assignment 2022-11-01 11:40:32 +09:00
Nobuyoshi Nakada
00d5b7ce7c vcs.rb: copy safe directory configuration
Now revision.tmp will be regenerated always and every times, even if
the recent file exists in the source directory, as far as using git.
On the other hand, VirtualBox mounts shared folders as root, and git
rejects the repository there as dubious ownership.
2022-10-30 17:06:33 +09:00
Nobuyoshi Nakada
b64514f132 vcs.rb: prettify debug print 2022-10-30 17:06:33 +09:00
Nobuyoshi Nakada
ab31d2e69f
Add --zone option to VCS
Which controls the timezone offset for `RUBY_RELEASE_DATE`.
2022-09-30 10:39:43 +09:00
Nobuyoshi Nakada
5a5644dadc
Introduce VCS::Null for fallback 2022-09-30 10:39:42 +09:00
Nobuyoshi Nakada
f70ba9cf80
Check for the availability of the command when detecting 2022-09-30 10:39:42 +09:00
Nobuyoshi Nakada
58b3a535cc
Pull up VCS.short_revision from VCS::SVN 2022-09-30 09:21:02 +09:00
Takashi Kokubun
922e61fcc2
Remove git command existence check again
With 33c6dd2cc89c27bbf406508ec39038a181fb99bc, it's no longer necessary.

This is what I got on openbsd-current:

```
-bash-5.1$ git -v
unknown option: -v
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [--super-prefix=<path>] [--config-env=<name>=<envvar>]
           <command> [<args>]
-bash-5.1$ git version
git version 2.35.1
```
2022-09-17 23:05:10 +09:00
Takashi Kokubun
33c6dd2cc8
Fallback to VCS.release_date on VCS::NotFoundError
when -q is given.

One of the RubyCI servers, freebsd12, had a broken git environment:

```
$ git show
fatal: detected dubious ownership in repository at '/usr/home/chkbuild/chkbuild/tmp/build/20220917T123002Z/ruby'
To add an exception for this directory, call:

        git config --global --add safe.directory /usr/home/chkbuild/chkbuild/tmp/build/20220917T123002Z/ruby
```

tool/lib/vcs.rb doesn't work normally for that server.
Even for such cases, we'd like to generate a usable revision.h.

So this patch lets revision.h fallback to default VCS.release_date
when VCS::NotFoundError is raised.
2022-09-17 22:24:10 +09:00
Takashi Kokubun
38a7a13ac6
Auto-generate the release date on version.h from git CommitDate (#6382)
* Auto-generate the release date on version.h

from git CommitDate

* Generate revision.h on mswin
2022-09-17 21:16:06 +09:00
Nobuyoshi Nakada
c28a4e0340
Replace "Fixes"/"Fixed" in commit logs as well as vcs.rb [ci skip]
Use the same regexp to replace "(#NNNN)" and "GH-NNNN" style
references in vcs.rb, too.
2022-09-14 11:24:06 +09:00
Nobuyoshi Nakada
462a8be511
VCS#revision_header: Make arguments optional 2022-09-01 20:57:30 +09:00
Nobuyoshi Nakada
55b1600987
Update revision.h in packages using VCS#revision_header 2022-09-01 18:45:09 +09:00
Nobuyoshi Nakada
ee09f75a6b
Extract VCS#revision_header 2022-09-01 18:01:40 +09:00
Nobuyoshi Nakada
7fd51c0241
vcs.rb: ignore configuration files get rid of aliases [ci skip] 2022-06-22 09:33:25 +09:00
Nobuyoshi Nakada
bc77cda8fd
vcs.rb: just one log to check if --date option works [ci skip] 2022-06-22 09:32:01 +09:00
Nobuyoshi Nakada
0dcd25b711
vcs.rb: show diagnostic/progressing messages when debugging [ci skip] 2022-06-22 09:31:19 +09:00
Nobuyoshi Nakada
3a145066a6
Expand upstream issue numbers to URLs in ChangeLog 2021-09-04 00:26:39 +09:00
Nobuyoshi Nakada
af68112a1b
Add some punctuations as regexp separators to fix commit logs 2021-09-03 23:46:33 +09:00
Nobuyoshi Nakada
b8386f7f7f
Prepend DebugSystem to VCS class only
And revert 24e5f1c982966c379220b1bbb26b4e0320180fa1, pepending to
Kernel did not affect the top level methods before 3.0.
2021-07-26 15:44:40 +09:00
Nobuyoshi Nakada
dfff1df95c
vcs.rb: update the given option to VCS.detect by keyword arguments 2021-02-08 23:56:19 +09:00
Nobuyoshi Nakada
a0faad38ce
vcs.rb: added base_url keyword option to GIT#export_changelog 2021-02-08 23:56:01 +09:00
Nobuyoshi Nakada
ced09d521c
vcs.rb: improved export_changelog
* arguments are optional
* `path` may be passed as a keyword argument
* `nil` or `"-"` path means stdout
2021-02-08 23:45:51 +09:00
Nobuyoshi Nakada
1e2a8f7c94
vcs.rb: fix for baseruby 2.2 2021-01-26 10:30:29 +09:00
Nobuyoshi Nakada
6963e682f8
vcs.rb: support d command in log-fix 2021-01-26 10:04:12 +09:00
Nobuyoshi Nakada
a56760b908
vcs.rb: allow log-fix to insert an empty line 2021-01-26 09:58:11 +09:00
Nobuyoshi Nakada
6ef761a515 vcs.rb: continue just with warning if failed to fetch notes 2021-01-23 10:07:49 +09:00
Nobuyoshi Nakada
ccd7b7ab9a vcs.rb: include commit info in ChangeLog 2021-01-23 10:07:49 +09:00
Nobuyoshi Nakada
3b631d0f73
Support i command in log-fix 2021-01-21 01:03:01 +09:00
Nobuyoshi Nakada
ddacff2b41
Follow up on variations of the development start messages [ci skip] 2020-12-25 17:43:23 +09:00
Kazuhiro NISHIYAMA
82489f0242
Show messages around the line when replacing failed in format_changelog 2020-07-10 19:27:11 +09:00
Jeremy Evans
07b2102a88 Remove Ruby <2.2 support from tool/lib/vcs.rb
BASERUBY now requires at least Ruby 2.2, so there is no point
trying to support older ruby versions here.
2020-05-28 07:57:29 -07:00
Nobuyoshi Nakada
2b7409a2f2
Specify explicit separator not to be affected by $; 2020-03-08 17:38:37 +09:00
Nobuyoshi Nakada
b68fc08092
Indent ChangeLog contents [ci skip]
Separate each entries more obviously as `page-delimiter' works
fine.
2020-02-01 23:26:53 +09:00
Nobuyoshi Nakada
ab35876444
Explicitly set the encoding of ChangeLog file to UTF-8 [ci skip] 2020-02-01 23:10:18 +09:00
Nobuyoshi Nakada
b34f39e860
vcs.rb: Allow to empty a part in commit log 2020-01-12 19:43:59 +09:00
Nobuyoshi Nakada
d254d5563e
vcs.rb: Get rid of Kernel#open 2020-01-09 10:04:22 +09:00
Nobuyoshi Nakada
80d5d220b9
Fix typo in commit logs by log-fix notes 2019-12-23 09:29:05 +09:00