Commit Graph

91 Commits

Author SHA1 Message Date
nhkeni
5c0137a6a5 comment/documentation typos 2025-10-26 12:26:11 -04:00
nhmall
a03b2c763b documentation URL fix 2025-10-25 09:57:04 -04:00
nhkeni
9313e819de nhgitset.pl: leftover tid 2025-01-24 10:57:40 -05:00
nhkeni
c27cb28ec5 Use old-style --int flag to git to work with older gits. 2024-12-24 12:51:23 -05:00
nhkeni
755b70de69 Make documentation of nhgitset.pl easier to find and
find out about.
2024-11-27 14:06:27 -05:00
nhkeni
36e8d9e6fc nhgitset version 4
To update, run "perl DEVEL/nhgitset.pl"

Fixes:
- "nhcommit -a" has been fixed
- NHDT was hardwired in places
- no longer complain about a missing dat directory outside of the
    NetHack source tree
- make update of gitinfo atomic
- Replace some hardwired directory separators with OS-dependent constructs

Backwards Incompatibilities:
- NH_DATESUB's DATE() is now Date() to match the other variables
- MSYS2 requires an additional Perl package - the MSYS2 docs have
    been updated

New Help System:
- git nhhelp
   This command mirrors "git help" for nh* commands.
- See git nhhelp nhsub for general help on substitution variables

New Substitution Variables:
-Brev()
    An aBREViation of $PREFIX-Branch$:$PREFIX-Revision$ - this
    may help get line length under control in file headers.
-Assert(TYPE=VALUE)
    If TYPE does not match VALUE, do not substitute on this line.
    TYPE P checks VALUE against nethack.substprefix
-Project(arg)
    Returns nethack.projectname if there is no arg and an uppercase
    version if arg is uc.

Other New Features:
- Add nethack.projectname
- Documentation updates - see "git nhhelp nhsub"
- On checkout or merge of a branch, check for nhgitset version updates
  and provide an optional message to the user.
- Move NH_DATESUB substitutions here from cron job to keep dates in sync
- PREFIX-* keywords now available in NH_DATESUB templates
- Support use of nhgitset.pl from a different repo; note that update
  checks will be dependent on keeping the original source repo up-to-date
  and in the same location.
2024-11-11 09:15:49 -05:00
nhmall
7dfb57ac2e git credential helper documentation update
The most-current macOS version is greater than 12 (15 at time of
this change).

Expand Windows suggestions to include variations specific to MSYS2 and WSL2.
2024-09-01 09:31:35 -04:00
nhkeni
9c30c1d08f add git info for RedHat-ish Linux distros 2024-04-26 21:27:47 -04:00
nhkeni
9f37ba849c code_style.txt: Document staticfn and NEARDATA. 2024-03-16 16:41:09 -04:00
RainRat
a3658f85ac fix typos 2024-02-28 20:15:56 -08:00
nhkeni
cd1002f84e DEVEL: add directions for a Linux credential helper 2024-02-28 14:05:23 -05:00
PatR
1958daef4c update code_style.txt
Primarily to describe comments.

Also strips a couple of trailing spaces.
2023-09-16 11:59:55 -07:00
nhkeni
9136c75425 nhgitset.pl tid
Older versions of git, when cloning a repo and
the expected source templates directory does not
exist, does not create .git/hooks, which causes
nhgitset.pl to fail.  So do it here.
2023-08-29 21:04:32 -04:00
nhmall
6e3ccaa8a5 notes about some header files
The gist of this appeared previously in the commit message for
b722cf99.
2023-07-04 09:53:51 -04:00
nhmall
6864e6cf22 add a note 2022-11-10 11:57:00 -05:00
nhmall
3db819478f update OS terminology used in some text references 2022-02-04 11:26:14 -05:00
Dean Luick
2c38749cab Update code style for ANSI function prototypes 2021-01-29 09:01:15 -06:00
nhmall
ac9ba38449 file header bump from "NetHack 3.6" to "NetHack 3.7" 2020-08-03 22:07:36 -04:00
nhmall
8961331478 bit 2020-03-22 07:39:44 -04:00
nhmall
3db895a64e correction 2018-12-10 22:39:11 -05:00
nhmall
ca84486133 clean master after moving of newer content to feature branch 2018-12-10 22:16:08 -05:00
nhmall
e3ededd309 Merge branch 'NetHack-3.6.2' 2018-12-10 17:26:20 -05:00
nhmall
2243b1bb00 trigger update 2018-12-10 17:24:32 -05:00
nhmall
a0b53ee391 merge 2018-11-11 10:29:52 -05:00
nhmall
b286ed510a Merge branch 'NetHack-3.6.2' 2018-09-20 18:45:37 -04:00
nhmall
2ea332544b Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-20 18:45:08 -04:00
nhmall
672e28d294 Merge branch 'fix-grammar-and-punctuation' of https://github.com/mogigoma/NetHack into mogigoma-fix-grammar-and-punctuation 2018-09-20 18:01:32 -04:00
Mak Kolybabi
9c46a26af4 Grammar and punctuation fixes. 2018-09-19 22:48:43 -05:00
Mak Kolybabi
0500040427 Fix spelling and capitalization issues in dat and DEVEL. 2018-09-19 16:55:43 -05:00
nhmall
6585b58c57 Merge branch 'NetHack-3.6.2' 2018-06-11 16:36:27 -04:00
keni
0e51afc7cd update Files attributes with priorities and %s substitution 2018-05-31 21:42:06 -04:00
keni
9858f69fa8 update .gitattributes files for auto-generation of Files 2018-05-29 19:28:26 -04:00
nhmall
0e2555881a Merge branch 'NetHack-3.6.0' 2018-04-25 18:15:49 -04:00
keni
0f58af6f37 add missing copyright info 2018-04-25 16:54:50 -04:00
keni
09502df9f1 force expand unexpanded substitution variables 2018-04-25 15:36:11 -04:00
keni
11f1983253 update .gitattributes files for substitution and copyright headers 2018-04-25 14:52:43 -04:00
keni
6afb3ead34 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-03-10 19:14:11 -05:00
PatR
f026e37573 last gitinfo bit?
If dat/gitinfo.txt is being created from scratch, say so instead of
saying "updated".
2018-03-10 12:55:28 -08:00
PatR
03da0190fb nhversioning update
Update dat/gitinfo.txt if the current branch is different from the
one recorded in the file, not just when the commit hash is different.

Make the usual output less verbose so that it fits within 80 columns.
2018-03-06 17:16:49 -08:00
PatR
62cf7d11bf remove .NHgithook.pm.swp 2018-03-06 17:08:18 -08:00
keni
cd96394ccd Update docs, man page.
Add last chance attempt to build dat/gitinfo.txt
2018-02-23 19:50:28 -05:00
nhmall
c8196b6451 a documentation bit 2018-02-23 19:50:28 -05:00
keni
cf9cf038f3 gitinfo.pl: special case code to allow running it from $TOP or DEVEL without
installing the hooks first
NHgithook.pm: add some warnings if nhversioning can't open files
make sure nhversioning fails before opening gitinfo.txt if it can't get valid
 data
2018-02-23 19:50:15 -05:00
nhmall
65655d2cee Incorporate some git information into NetHack
Incorporate some git information into NetHack so that it
is potentially visible to a player. That's useful when
collecting details about the version that they are
running and, if the gitinfo is present, it can tie the
code to a specific git commit in the repository.

This modifies 'makedefs -v' to check for the presence of a data file
called dat/gitinfo.txt and if it is there, parse out its
contents, then write additional lines to include/date.h beyond
what 'makedefs -v' was previously putting in there, similar to
this sample:

      #define NETHACK_GIT_SHA "0c84e564c78e2024e562d39539376ce2e21eec8e"
      #define NETHACK_GIT_BRANCH "NetHack-3.6.0"

The contents of an appropriate dat/gitinfo.txt are as follows,
and trailing/leading whitespace is not significant:

      githash = 0c84e564c78e2024e562d39539376ce2e21eec8e
      gitbranch = NetHack-3.6.0

It also adjusts the contents of the 'v' version information to
include the additional git info when available.

Also adds some hooks DEVEL/hooksdir and a perl file to DEVEL
for simplifying and automating the deposit of dat/gitinfo.txt
so that it generally reflects the most current git commit.

DEVEL/gitinfo.pl can be used to build dat/gitinfo.txt at any
time without doing a commit, merge, or checkout.
    	perl DEVEL/gitinfo.pl

command line --version and -version support

To complement the extra information being provided in the
version by the 'v' command, this also adds support for the
following new command line arguments:
    --version
     -version            Output the NetHack version string then exit.

    --version:paste      Output the NetHack version string and also copy it to
     -version:paste      the platform's paste buffer for insertion somewhere,
                         then exit.

If the paste variation of -version is requested on a platform that
hasn't incorporated any support for the capability, it will deliver
the version info then an error message, prior to exiting.

To support the extended -version:paste variation, a port needs to:
    - provide a port-specific routine to perform
      the paste buffer copy in a port code file.
    - #define RUNTIME_PASTEBUF_SUPPORT in the include/portconf.h header file.

    --skeleton--
    void port_insert_pastebuf(buf)
    char *buf;
    {
    	/* insert code to copy the version info from buf into
    	   platform's paste buffer in a supported way */
    }

macosx and Windows have both added support for RUNTIME_PASTEBUF_SUPPORT
2018-02-23 19:34:44 -05:00
keni
6aa594b8d0 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-02-20 10:09:57 -05:00
nhmall
25d17eb62c fix some typos mentioned downstream 2018-02-19 21:32:54 -05:00
nhmall
7a0ad0ff21 sync README and DEVEL/Developer re: repositories 2018-02-19 11:18:57 -05:00
keni
12530cb155 infrastructure fixes:
- fix bug in git hooks that loses file permissions when doing variable expansion
- fix execute permissions on sys/unix/hints/macosx.sh
- explicitly call out perl as required for hooks in Developer.txt
2018-02-16 12:07:37 -05:00
nhmall
9728616a21 fix branch placement of change 2018-01-26 08:06:23 -05:00
nhmall
fec245dba2 Only update dat/gitinfo.txt if the hash is new 2018-01-26 08:01:03 -05:00