[Tool/Web/Other] samp-git-hash || Generate an include with the most recent Git hash.
#1

About:
This is a simple C program that fetches the git hash of the directory it is executed in and generates an include for Pawn from said git hash so you can include it.
This can be useful when you have frequent server updates, this way users can report bugs with the hash and you'd be able to go back to the precise revision without having to tag all releases.

Features:
  • Fast execution.
  • Easy to use.
  • Easy to compile.
  • Small size.
What?!:
Some development teams release versions of their server very fast, sometimes multiple times per day.
With this you don't need to keep on defining revisions manually for the revision to appear ingame.
Just include this, and use _INC_GIT_HASH_GIT_HASH wherever you want to mention the current revision.
What you do then is run the executable just before you're going to compile your Pawn code, that way the latest git hash will be the one of HEAD.

Notes:
You only need this script if you use Git with your Pawn project.
Any additional information is available at the GitHub page.

I'm sure that I have committed many C sins, this is the first thing other than "Hello World!" that I have made in C.
If you see something that needs to be improved please point it out or fork it, change it and make a pull request.

Download:
GitHub (including binaries)

packages:
The packages below are available in my personal YUM repository under the name samp-git-hash, you can add the repository to your configuration with the following Shell command.
Code:
curl -o /etc/yum.repos.d/jeroendeneef.repo https://rpm.jeroendeneef.com/jeroendenee...eneef.repo
The repository is specifically made for CentOS 6 and 7 and so are the packages, however I don't see a reason why it wouldn't work on RHEL and derivatives.

Reply


Messages In This Thread
samp-git-hash || Generate an include with the most recent Git hash. - by Jeroen52 - 20.01.2016, 02:58
Re: samp-git-hash || Generate an include with the most recent Git hash. - by Jeroen52 - 20.01.2016, 22:34
Re: samp-git-hash || Generate an include with the most recent Git hash. - by Jeroen52 - 22.02.2016, 00:34
Re: samp-git-hash || Generate an include with the most recent Git hash. - by Jeroen52 - 11.09.2016, 03:02

Forum Jump:


Users browsing this thread: 1 Guest(s)