[Slackbuilds-users] Creating First Slackbuilds and Github
sb at rbn.im
Sun Mar 20 22:58:19 UTC 2022
2022-03-20 "B. Watson" <urchlay at slackware.uk>:
> On Sat, 19 Mar 2022, Ruben Schuller wrote:
> > ZIPVER="1369d247e3d2bc697892795dea8cc1713344749f"
> > for the version I'd either go with the date like 220319 if there
> > aren't multiple commits on that date, or with the short-hash of
> > git:
> Recommendations... in fact I'm begging you: if you're going to use
> a git commit, *please* include the date in YYMMDD format in your
> VERSION number. Example:
> Notice the 4-digit year comes first... the point of doing it this way
> is that a user can easily tell which version is newer, when looking
> at multiple packages. If you use only the git commit hash, those are
> effectively random, there's no sense of which is newest.
> The SlackBuild can split up the VERSION variable as needed.
> Also, while I'm thinking about it: VERSION *must* be a constant that
> can be overridden by the environment. Example:
Very good point, including the date never hurts.
> *Please* don't try to get clever and do stuff like:
> VERSION="$( echo $COMMIT | head -c7 )"
Note, for completeness, that the git short hash might be longer than
seven characters because of collisions. The git command figures that
out. Don't just shorten it :)
More information about the SlackBuilds-users