Commit Graph

53 Commits

Author SHA1 Message Date
keni
9858f69fa8 update .gitattributes files for auto-generation of Files 2018-05-29 19:28:26 -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
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
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
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
keni
b31033b7a0 add Windows info 2015-11-10 13:27:32 -05:00
Sean Hunt
cc50ecda67 Provide documentation for the regex engine.
The guidebook entries could do with more detailed descriptions, but this
will do for now.
2015-05-24 10:19:32 -04:00
PatR
91f444b867 code_style for emacs 2015-05-09 17:05:36 -07:00
Derek S. Ray
c429dc8722 Add token Visual Studio section 2015-05-09 15:13:00 -04:00
Sean Hunt
82ea1472f4 Add a coding style document.
I've put my best approximation of what the style should be in here. I
don't intend for this to be prescriptive, except as the DevTeam has
agreed, so I do encourage discussion on the mailing list. I would also
appreciate if people with other editors could include the appropriate
configuration recipes.
2015-05-09 14:45:01 -04:00
Sean Hunt
8c0c587fd7 Restore lost executable bits. 2015-05-06 23:23:48 -04:00
karnov
2a907f894e Version number increment 2015-05-06 22:04:27 -04:00
keni
7823322556 nhsub: add -m flag for fixing commit dates 2015-04-30 22:00:19 -04:00
keni
24eb44a8c0 force date change (another mail test) 2015-04-24 10:11:17 -04:00
keni
de87c7550c and fill in the line (another mail test) 2015-04-24 10:01:00 -04:00
keni
34508d5df2 add a date line (another mail test) 2015-04-24 09:56:24 -04:00
keni
2774278607 enable subst for all DEVEL/*.txt (really another mail test) 2015-04-24 09:32:50 -04:00
keni
a2dcc89838 force the date (really testing email) 2015-04-24 09:11:33 -04:00
keni
04f6fe8e51 Developer.txt: add notes about branches 2015-04-20 20:49:18 -04:00
keni
b490b10b0f Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-13 19:33:26 -04:00
keni
4e45cf3e7f nhsub: handle git add/commit options that take an argument 2015-04-13 19:32:51 -04:00
nhmall
2f4e7b601d text file error corrections
Changes to be committed:
	modified:   DEVEL/code_features.txt
	modified:   Files
	modified:   dat/history

On 4/11/2015 6:45 PM, Dion Nicolaas wrote:
> Errors in text files:
> - DEVEL/code_features.txt, line 10: 'alterting' should be 'alerting'

fixed

> - dat/history: Is it intentional that I'm no longer mentioned as
> maintaining the Windows port? I am for 3.4, but not for 3.6.

fixed

> - Files: The Files file is incomplete. Notably, the new files in dat/
> are missing (bogusmon.txt, engrave.txt, epitaph.txt),

fixed

> the DEVEL directory, doc/Guidebook.*

> - Some files in Files have the wrong case: NetHack.sln,
> NetHackW.vcxproj. I know it doesn't matter on windows but it looks wrong.

fixed
2015-04-11 21:02:11 -04:00
keni
ed631c51fa nhsub docs and fixes 2015-04-08 10:31:49 -04:00
keni
5cff7e59aa nhsub: handle some more cases 2015-04-06 17:48:48 -04:00
keni
89b0fd5ca7 nhsub bug fixes 2015-04-04 15:43:58 -04:00
keni
32236f7985 bug fixes for nhsub 2015-04-01 14:40:48 -04:00
keni
fdd49dde86 Update docs for NHDT V2. 2015-03-31 12:29:58 -04:00
keni
8ee2d5976e NHDT substitution version 2.
Re-run nhgitset.pl to install.
"perldoc DEVEL/hooksdir/nhsub" for details.  General docs still to come.
Quick notes:
- "git nhsub" lets you apply substitutions to a file without involving any
  version control.
- When doing nhadd/nhcommit, the working directory WILL reflect the results
  of the substitutions.
Let's see what this breaks.
2015-03-31 09:50:02 -04:00
Derek S. Ray
12ca92aa42 Fix 'fetch' syntax, include sparkly 'git log' trick
And bolt a couple more Win32-folders onto .gitignore.
2015-03-25 17:07:10 -04:00
keni
2ae33fa514 NHsubst bugfixes and hack for whitespace errors. 2015-03-24 18:29:02 -04:00
nhmall
0e6355e017 Add note about feature alert mechanism 2015-03-22 18:04:18 -04:00
nhmall
3b064145a3 File for explaining code quirks/features/caveats
- added NOCWD_ASSUMPTIONS and PREFIXES_IN_USE section.
2015-03-22 15:05:18 -04:00
Derek S. Ray
4914e256bf finally remember to add the 'nh-' versions 2015-03-16 17:26:31 -04:00
Derek S. Ray
de8e1a5a9d Some few updates/additions; clean up formatting 2015-03-15 14:28:01 -04:00
Derek S. Ray
1e76ed28ae Initial version of simple recipes file 2015-03-12 22:47:44 -04:00
keni
23f213bc63 Fix NHtext when GIT_DIR is not defined. 2015-03-02 16:32:29 -05:00
keni
774e6c2f6f Switch NHtext from "git branch" to "git symbolic-ref" to avoid corner cases. 2015-03-01 20:26:29 -05:00
keni
91b96e2331 Change NHtext to double the speed of "git checkout" 2015-02-28 17:52:19 -05:00
keni
5dda2afd32 Fix bug: NHtext adds a space to a substitution value.
Add support for debugging from the command line.
2015-02-16 08:53:52 -05:00
keni
8c7b6cd110 add another note about executable scripts 2015-02-13 11:54:04 -05:00