mirror of
https://github.com/opnsense/plugins.git
synced 2025-12-10 10:30:21 -06:00
Framework: add revision bump helper and fix a typo
This commit is contained in:
parent
82f5492491
commit
4ab914ceaf
2
Makefile
2
Makefile
@ -43,7 +43,7 @@ list:
|
||||
.endfor
|
||||
|
||||
# shared targets that are sane to run from the root directory
|
||||
TARGETS= clean lint style style-fix style-python sweep test
|
||||
TARGETS= clean lint revision style style-fix style-python sweep test
|
||||
|
||||
.for TARGET in ${TARGETS}
|
||||
${TARGET}:
|
||||
|
||||
@ -325,7 +325,10 @@ sweep: check
|
||||
! -name "*.ser" -type f -print0 | \
|
||||
xargs -0 -n1 ${SCRIPTSDIR}/cleanfile
|
||||
find ${.CURDIR} -type f -depth 1 -print0 | \
|
||||
xargs -0 -n1 ${SCRIPTSDIRs/cleanfile
|
||||
xargs -0 -n1 ${SCRIPTSDIR}/cleanfile
|
||||
|
||||
revision:
|
||||
${SCRIPTSDIR}/revbump.sh ${.CURDIR}
|
||||
|
||||
STYLEDIRS?= src/etc/inc src/opnsense
|
||||
|
||||
|
||||
16
Scripts/revbump.sh
Executable file
16
Scripts/revbump.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
DIR=${1}
|
||||
|
||||
if [ -z "${DIR}" ]; then
|
||||
DIR=.
|
||||
fi
|
||||
|
||||
REV=$(make -C ${DIR} -V PLUGIN_REVISION)
|
||||
REV=$(expr ${REV} \+ 1)
|
||||
|
||||
grep -v ^PLUGIN_REVISION ${DIR}/Makefile > ${DIR}/Makefile.tmp
|
||||
sed -e "s/^\(PLUGIN_VERSION.*\)/\1\nPLUGIN_REVISION= ${REV}/g" ${DIR}/Makefile.tmp > ${DIR}/Makefile
|
||||
rm -f ${DIR}/Makefile.tmp
|
||||
Loading…
x
Reference in New Issue
Block a user