Hmm... I think so.
The script would have to behave sensibly (perhaps generating an empty string or a single line error message) for the hash if there's no git and/or no git repository. Also, ... there might be a way of concating strings directly in a cmd script using dos variables. (I think you can get the contents of a text file into a cmd variable using a cmd for loop, but I haven't figured out the details of that syntax yet.) -- Raul On Wed, Apr 12, 2023 at 10:50 AM bill lam <bbill....@gmail.com> wrote: > > I think msys of windows git provides a friendlier environment than the dos > prompt but msys is mot mandatory for the working of windows git. A cmd file > can execute the git command if full path to git is supplied. > > However what if users just download the zipped source code but didn't clone > the j source repository? Can they still build binaries? > > On Wed, 12 Apr 2023 at 10:04 PM Raul Miller <rauldmil...@gmail.com> wrote: > > > git tags would be useful for rebuilding historic versions of J. > > > > However, in our current process, we do not necessarily create a tag as > > a part of a J release. > > > > So it would be nice if we retained enough information to retroactively > > tag a release. > > > > I think the best way of achieving this goal would be to include the > > git short hash (as provided by git rev-parse --short HEAD) in > > JVERSION. > > > > For example: > > > > echo "#define GITHASH $(git rev-parse --short HEAD)" >jsrc/githash.h > > > > And then #GITHASH would be a quoted string which could be exposed in > > the result of a !: verb. > > > > Accomplishing this in a .cmd file would be similar but I don't know > > enough about that environment. (Possibly, the implementation of git > > includes a mingw shell, which would support this exact same syntax?) > > > > Thanks, > > > > -- > > Raul > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm