--- freem/scripts/fmd-setversion 2025/04/04 18:00:01 1.1 +++ freem/scripts/fmd-setversion 2025/04/06 03:38:05 1.3 @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# $Id: fmd-setversion,v 1.1 2025/04/04 18:00:01 snw Exp $ +# $Id: fmd-setversion,v 1.3 2025/04/06 03:38:05 snw Exp $ # Set version in FreeM repository # # @@ -25,6 +25,12 @@ # along with FreeM. If not, see . # # $Log: fmd-setversion,v $ +# Revision 1.3 2025/04/06 03:38:05 snw +# Prepare for adding packaging functionality to fmd +# +# Revision 1.2 2025/04/04 19:43:18 snw +# Switch to using environment catalog to determine user and group for environment, and remove -u and -g flags from freem +# # Revision 1.1 2025/04/04 18:00:01 snw # *** empty log message *** # @@ -33,15 +39,30 @@ # SPDX-License-Identifier: AGPL-3.0-or-later # -if [[ $# == 0 ]] +function usage() +{ + echo + echo "Sets the FreeM version in this repository" + echo + echo "usage:" + echo + echo " fmd setversion " + echo " - Sets the FreeM version in this repository to " + echo + echo " fmd setversion --revert" + echo " - Reverts to the previous FreeM version" + echo + exit 0 +} + +if [[ $1 == "help" ]] then - echo "setversion: must be run from 'fmd setversion'" - exit 1 + usage fi -if [[ ! -f sem.ver ]] +if [[ $# == 0 ]] then - echo "Not in the root of the FreeM repository." + echo "setversion: must be run from 'fmd setversion'" exit 1 fi @@ -84,7 +105,7 @@ echo '********************************** echo "${VERSTR}" >> ChangeLog echo "" >> ChangeLog -${FMD} log "Changed version from ${CURVER} to ${NEWVER}" +${FMD} log "Change version from ${CURVER} to ${NEWVER}" ${FMD} changelog ${NEWVER}