Skip to content

Commit

Permalink
mkrelease: script to run at release
Browse files Browse the repository at this point in the history
- updates trurl.1 and version.h accordingly

- update RELEASE-PROCEDURE.md to mention this

Reported-by: gnomon- on github
Fixes #315
  • Loading branch information
bagder committed Jul 29, 2024
1 parent 0942de3 commit ee83b01
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RELEASE-PROCEDURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ in the source code repo

- edit `RELEASE-NOTES` to be accurate

- edit `version.h` to contain the correct version
- run `./mkrelease [version]`

- make sure all relevant changes are committed on the master branch

Expand Down
41 changes: 41 additions & 0 deletions mkrelease
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
##########################################################################
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
##########################################################################

set -eu

export LC_ALL=C
export TZ=UTC

version="${1:-}"

if [ -z "$version" ]; then
echo "Specify a version number!"
exit
fi

ndate=`git log -n1 HEAD --date=format:'%B %d, %Y' --pretty=format:'%ad'`

sed -ie "s/^\.TH.*/.TH trurl 1 \"$ndate\" \"trurl $version\" \"trurl manual\"/" trurl.1

sed -ie "s/\"[\.0-9]*\"/\"$version\"/" version.h

0 comments on commit ee83b01

Please sign in to comment.