Skip to content

Commit

Permalink
bootstrap: build time replacement of release
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jun 29, 2021
1 parent a1ad3f6 commit 9b1525b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
upgrade: all install clean

UPDATE_RELEASE?= 21.1.7

_BOOTSTRAP_RELEASE= ${UPDATE_RELEASE:S/./ /g}
BOOTSTRAP_RELEASE?= ${_BOOTSTRAP_RELEASE:[1]}.${_BOOTSTRAP_RELEASE:[2]}
5 changes: 5 additions & 0 deletions bootstrap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ PREFIX?=${LOCALBASE}
BINDIR= ${PREFIX}/sbin
MANDIR= ${PREFIX}/man/man

CLEANFILES= ${SCRIPTS}

${SCRIPTS}: ${SCRIPTS}.in
sed -e 's|%%RELEASE%%|${BOOTSTRAP_RELEASE}|g' ${.ALLSRC} > ${.TARGET}

.include <bsd.prog.mk>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ URL="https://github.com/opnsense/core/archive"
WORKDIR="/tmp/opnsense-bootstrap"
FLAVOUR="OpenSSL"
TYPE="opnsense"
RELEASE="21.1"
RELEASE="%%RELEASE%%"

DO_ABI="-a ${RELEASE}"
DO_BARE=
Expand Down
4 changes: 2 additions & 2 deletions update/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ PREFIX?=${LOCALBASE}
BINDIR= ${PREFIX}/sbin
MANDIR= ${PREFIX}/man/man

CLEANFILES= opnsense-update.sh
CLEANFILES= ${SCRIPTS}

opnsense-update.sh: opnsense-update.sh.in
${SCRIPTS}: ${SCRIPTS}.in
sed -e 's|%%RELEASE%%|${UPDATE_RELEASE}|g' ${.ALLSRC} > ${.TARGET}

.include <bsd.prog.mk>

0 comments on commit 9b1525b

Please sign in to comment.