Commit graph

10 commits

Author SHA1 Message Date
Mathieu Arnold
5d33e04596
framework: Remove $FreeBSD$
Where appropriate fiddle with a few other things.
2021-04-06 16:27:10 +02:00
Gerald Pfeifer
4623a87843 Use 'make -C' instead of saving the current working directory and then
restoring that in the new code to add a safety belt that came in via
revision 477561.  This is quite a bit simpler and shorter.

Reported by:	adamw
PR:		226926
2018-08-20 00:39:32 +00:00
Gerald Pfeifer
8c7bf827a6 Add a stronger safety belt to this script by comparing the actual
PORTREVISION (using the Ports Collection framework, not just looking at
one Makefile individually at a time) before and after the bump.  If the
version after the bump isn't actually increased, flag that as an error.

As an example, before revision r464215 (cf. bug #226533) this script
would have wreaked wreak havoc on the multimedia/avidemux* ports.
This hardly can be blamed on bump-revision.sh, but with the additional
safety belt it does now detect such cases.

How to reproduce:

  % cd $PORTSDIR
  % svn up -r 464036 multimedia/
  % Tools/scripts/bump-revision.sh multimedia/avidemux*

With this patch we print:

  INFO: multimedia/avidemux PORTREVISION=	9 found, bumping it by 1.
  INFO: multimedia/avidemux-cli PORTREVISION not found, adding PORTREVISION= 1
  ERROR: multimedia/avidemux-cli PORTREVISION went backwards from 5 to 1!
  INFO: multimedia/avidemux-plugins PORTREVISION not found, adding PORTREVISION= 1
  ERROR: multimedia/avidemux-plugins PORTREVISION went backwards from 5 to 1!
  INFO: multimedia/avidemux-qt4 PORTREVISION not found, adding PORTREVISION= 1
  ERROR: multimedia/avidemux-qt4 PORTREVISION went backwards from 5 to 1!

The beauty of this approach is that it goes beyond a simple text search,
and leverages what the ports framework itself does.

PR:		226926, 226533
Approved by:	maintainer timeout (20+ weeks)
Reviewed by:	mandree, riggs
2018-08-19 09:17:56 +00:00
Mathieu Arnold
e47d0d2e02 fixup last updates, and try to be better with slave ports.
the case $? needs to have the exit status of the grep, not the awk line,
so remove the awk line, it was not really helpful anyway.

Also, with slave ports, most of the time, they don't have
(PORT|DIST)VERSION,  try to use CATEGORIES, PKGNAMEPREFIX or
PKGNAMESUFFIX.

PR:		211243
Submitted by:	mat
Approved by:	maintainer timeout
Sponsored by:	Absolight
2016-08-03 13:27:47 +00:00
Bartek Rutkowski
ab6c260d33 Tools/scripts/bump-revision.sh: fix regression introduced in r380431
- Fix regression mistakenly introduced in r380431
- Handle multiple tabs in PORTREVISION
- Handle PORTREVISION being a variable name
- Handle multiple PORTREVISION values
- Get rid of bash-like syntax
- Grammar corrections

PR:		192910
Reviewed by:	danfe, mandree, mat
2015-03-04 23:21:59 +00:00
Bartek Rutkowski
e9b9c710a6 Tools/scripts/bump-revision.sh: various fixes
- Write nicer code replacing fix introduced by mandree
- Catch up some more edge cases

PR:		192910
2015-03-04 12:07:40 +00:00
Mathieu Arnold
9a22293c2e Make this work with any amount of tabulations between the = and the value of PORTREVISION.
Sponsored by:	Absolight
2014-11-18 16:26:09 +00:00
Mathieu Arnold
f10048320e Fix if PORTREVISION is not already there.
Sponsored by:	Absolight
2014-11-18 16:03:40 +00:00
Matthias Andree
f8f8110e2a Catch and report substitution failure on lines such as PORTREVISION=${SOME_VAR}. 2014-08-22 07:13:51 +00:00
Bartek Rutkowski
43baa4d6be New script: Tools/scripts/bump-revision.sh
This script, requested by bapt@, is a pure sh tool to increase one
or more ports PORTREVISION value or to add one, if the port havent
had one already.

Approved by:	swills (mentor), bapt
2014-06-26 17:15:39 +00:00