From b159bafcefd70b727be46086ebbff957a1ac2f93 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Tue, 17 Aug 2021 10:17:37 +1000 Subject: [PATCH] Prepare for release 2.5-1 (#91) * Update NEWS for release 2.5-1 * Use GNU utilities on MacOS * Update Copyright dates in release.sh * Limit lines matched by version number in release.sh * Revert version in DESCRIPTION to match version in other files * Update versions and dates for release 2.5-1 * Update NEWS and DESCRIPTION --- DESCRIPTION | 4 ++-- INSTALL | 4 ++-- LICENSE | 2 +- NEWS | 5 +++++ R/RNetCDF.R | 2 +- configure | 18 +++++++++--------- configure.ac | 2 +- src/RNetCDF.h | 4 ++-- src/attribute.c | 4 ++-- src/common.c | 4 ++-- src/common.h | 4 ++-- src/convert.c | 4 ++-- src/convert.h | 4 ++-- src/dataset.c | 4 ++-- src/dimension.c | 4 ++-- src/group.c | 4 ++-- src/init.c | 4 ++-- src/type.c | 4 ++-- src/udunits.c | 4 ++-- src/variable.c | 4 ++-- tests/RNetCDF-test.R | 4 ++-- tools/convert.m4 | 4 ++-- tools/release.sh | 41 ++++++++++++++++++++--------------------- 23 files changed, 71 insertions(+), 67 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 183cc7b8..f0b8b87b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: RNetCDF -Version: 2.5-0 -Date: 2021-07-26 +Version: 2.5-1 +Date: 2021-08-16 Title: Interface to 'NetCDF' Datasets Authors@R: c(person("Pavel", "Michna", role = "aut", email = "rnetcdf-devel@bluewin.ch"), diff --git a/INSTALL b/INSTALL index 0f3a0dd1..b422b136 100644 --- a/INSTALL +++ b/INSTALL @@ -39,7 +39,7 @@ R CMD INSTALL Example ===================== R CMD INSTALL --configure-args="CPPFLAGS=-I/sw/include \ - LDFLAGS=-L/sw/lib LIBS=-lhdf5" RNetCDF_2.4-2.tar.gz + LDFLAGS=-L/sw/lib LIBS=-lhdf5" RNetCDF_2.5-1.tar.gz LD_LIBRARY_PATH @@ -68,7 +68,7 @@ R CMD check Example =================== R CMD check --install-args="--configure-args='CPPFLAGS=-I/sw/include \ - LDFLAGS=-L/sw/lib'" RNetCDF_2.4-2.tar.gz + LDFLAGS=-L/sw/lib'" RNetCDF_2.5-1.tar.gz Time units diff --git a/LICENSE b/LICENSE index cc7a8b02..627a105d 100644 --- a/LICENSE +++ b/LICENSE @@ -6,7 +6,7 @@ RNetCDF ======= All files except those indicated later are -Copyright (C) 2004-2020 Pavel Michna and Milton Woods. +Copyright (C) 2004-2021 Pavel Michna and Milton Woods. They are licensed under the terms of the GNU General Public License: This program is free software; you can redistribute it and/or modify diff --git a/NEWS b/NEWS index 0af633a2..57802434 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +Version 2.5-1, 2021-08-08 + * Support hdf5 filters via multi-filter interface (netcdf>=4.8.0) + * Windows: update binary packages to netcdf 4.7.4 with OpenDAP + * Generate type conversions with m4 macros + Version 2.4-2, 2020-09-12 * Support reading/writing special values (e.g. NA, Inf) without substitution, mainly in cases where type conversion between R and NetCDF is not required. diff --git a/R/RNetCDF.R b/R/RNetCDF.R index f5a0bc96..3658cd5e 100644 --- a/R/RNetCDF.R +++ b/R/RNetCDF.R @@ -7,7 +7,7 @@ # Author: Pavel Michna (rnetcdf-devel@bluewin.ch) # Milton Woods (miltonjwoods@gmail.com) # -# Copyright: (C) 2004-2020 Pavel Michna, Milton Woods +# Copyright (C) 2004-2021 Pavel Michna and Milton Woods. # #=============================================================================== # diff --git a/configure b/configure index 06f7cca5..c1eb56bb 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for RNetCDF 2.4-2. +# Generated by GNU Autoconf 2.71 for RNetCDF 2.5-1. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='RNetCDF' PACKAGE_TARNAME='rnetcdf' -PACKAGE_VERSION='2.4-2' -PACKAGE_STRING='RNetCDF 2.4-2' +PACKAGE_VERSION='2.5-1' +PACKAGE_STRING='RNetCDF 2.5-1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1255,7 +1255,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures RNetCDF 2.4-2 to adapt to many kinds of systems. +\`configure' configures RNetCDF 2.5-1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1317,7 +1317,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of RNetCDF 2.4-2:";; + short | recursive ) echo "Configuration of RNetCDF 2.5-1:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -RNetCDF configure 2.4-2 +RNetCDF configure 2.5-1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1852,7 +1852,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by RNetCDF $as_me 2.4-2, which was +It was created by RNetCDF $as_me 2.5-1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4615,7 +4615,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by RNetCDF $as_me 2.4-2, which was +This file was extended by RNetCDF $as_me 2.5-1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4670,7 +4670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -RNetCDF config.status 2.4-2 +RNetCDF config.status 2.5-1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 60c1d648..35c8739e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Initialize # #-------------------------------------------------------------------------------# -AC_INIT([RNetCDF],[2.4-2]) +AC_INIT([RNetCDF],[2.5-1]) #-------------------------------------------------------------------------------# # Find the compiler and compiler options to use for tests # diff --git a/src/RNetCDF.h b/src/RNetCDF.h index d6a7df3c..3e7711df 100644 --- a/src/RNetCDF.h +++ b/src/RNetCDF.h @@ -2,14 +2,14 @@ * * Name: RNetCDF.h * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: Declare RNetCDF functions callable from R * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/attribute.c b/src/attribute.c index b18c6999..d48b6c47 100644 --- a/src/attribute.c +++ b/src/attribute.c @@ -2,14 +2,14 @@ * * Name: attribute.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: NetCDF attribute functions for RNetCDF * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/common.c b/src/common.c index 6ff95fe6..af9b20d0 100644 --- a/src/common.c +++ b/src/common.c @@ -2,14 +2,14 @@ * * Name: common.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: Common definitions for RNetCDF functions * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/common.h b/src/common.h index 2670fbf2..95a96758 100644 --- a/src/common.h +++ b/src/common.h @@ -2,14 +2,14 @@ * * Name: common.h * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: Common definitions for RNetCDF functions * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/convert.c b/src/convert.c index a95dfe13..1038a220 100644 --- a/src/convert.c +++ b/src/convert.c @@ -4,14 +4,14 @@ * * Name: convert.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: Type conversions for RNetCDF * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/convert.h b/src/convert.h index 593b4578..30b3edff 100644 --- a/src/convert.h +++ b/src/convert.h @@ -2,14 +2,14 @@ * * Name: convert.h * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: Type conversions for RNetCDF * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/dataset.c b/src/dataset.c index 4c8bcc64..917d1ce4 100644 --- a/src/dataset.c +++ b/src/dataset.c @@ -2,14 +2,14 @@ * * Name: dataset.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: NetCDF dataset functions for RNetCDF * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/dimension.c b/src/dimension.c index bc2e5c1c..8f6a4c7b 100644 --- a/src/dimension.c +++ b/src/dimension.c @@ -2,14 +2,14 @@ * * Name: dimension.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: NetCDF dimension functions for RNetCDF * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/group.c b/src/group.c index febb2fd7..4c69dff0 100644 --- a/src/group.c +++ b/src/group.c @@ -2,14 +2,14 @@ * * Name: group.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: NetCDF group functions for RNetCDF. * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/init.c b/src/init.c index eac5b59e..7ff9236f 100644 --- a/src/init.c +++ b/src/init.c @@ -2,14 +2,14 @@ * * Name: common.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: RNetCDF initialisation * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/type.c b/src/type.c index c9354f14..913489cb 100644 --- a/src/type.c +++ b/src/type.c @@ -2,14 +2,14 @@ * * Name: type.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: NetCDF type functions for RNetCDF * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/udunits.c b/src/udunits.c index ebd976ac..90f546a6 100644 --- a/src/udunits.c +++ b/src/udunits.c @@ -2,14 +2,14 @@ * * Name: udunits.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: udunits2 functions for RNetCDF. * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/src/variable.c b/src/variable.c index 9bd607c1..1bca1a00 100644 --- a/src/variable.c +++ b/src/variable.c @@ -2,14 +2,14 @@ * * Name: variable.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: NetCDF variable functions for RNetCDF * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/tests/RNetCDF-test.R b/tests/RNetCDF-test.R index ac441d38..5708e7e8 100644 --- a/tests/RNetCDF-test.R +++ b/tests/RNetCDF-test.R @@ -2,14 +2,14 @@ # # Name: RNetCDF-test.R # -# Version: 2.4-2 +# Version: 2.5-1 # # Purpose: Test functions to the NetCDF interface for R. # # Author: Pavel Michna (rnetcdf-devel@bluewin.ch) # Milton Woods (miltonjwoods@gmail.com) # -# Copyright: (C) 2010-2020 Pavel Michna, Milton Woods +# Copyright (C) 2004-2021 Pavel Michna and Milton Woods. # #===============================================================================# # diff --git a/tools/convert.m4 b/tools/convert.m4 index cc09665e..2291cef3 100644 --- a/tools/convert.m4 +++ b/tools/convert.m4 @@ -5,14 +5,14 @@ dnl Insert warning into generated C code: * * Name: convert.c * - * Version: 2.4-2 + * Version: 2.5-1 * * Purpose: Type conversions for RNetCDF * * Author: Pavel Michna (rnetcdf-devel@bluewin.ch) * Milton Woods (miltonjwoods@gmail.com) * - * Copyright: (C) 2004-2020 Pavel Michna, Milton Woods + * Copyright (C) 2004-2021 Pavel Michna and Milton Woods. * *=============================================================================* * diff --git a/tools/release.sh b/tools/release.sh index 8b49d8f9..cdb2932c 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -20,18 +20,18 @@ fi thisdir="$( dirname "$0" )" cd "$thisdir/.." +# Use GNU versions of some utilities: +kernel=$( uname ) +if [[ "$kernel" == Darwin ]]; then + alias date=gdate # MacPorts coreutils + alias find=gfind # MacPorts findutils + alias sed=gsed # MacPorts gsed +fi + # Define function to convert date formats: -if date -v 1d >/dev/null 2>&1; then - # BSD date - DATEFMT() { - date -j -f '%Y-%m-%d %H:%M:%S %z' "$1" +%Y%m%d%H%M.%S - } -else - # GNU date - DATEFMT() { - date -d "$1" +%Y%m%d%H%M.%S - } -fi +DATEFMT() { + date -d "$1" +%Y%m%d%H%M.%S +} # Check that generated files are up-to-date: if test -n "$( git status --porcelain )"; then @@ -68,18 +68,17 @@ fi # Get existing version string: oldver="$( grep 'Version: ' DESCRIPTION | awk '{ print $2 }' )" +# Define copyright line: +year=$( date +%Y ) +copyright="Copyright (C) 2004-$year Pavel Michna and Milton Woods." + # Replace version string in all files (excluding hidden files). -# In-place option of sed is not portable between GNU and BSD versions. -find . -mindepth 1 -name '.*' -prune -o -type f ! -name NEWS -print | while read file; do - sed "s|$oldver|$newver|g" "$file" >"$file.sed" - if [[ -x "$file" ]]; then - # Preserve execute permissions: - chmod +x "$file.sed" - fi - mv "$file.sed" "$file" +find . -mindepth 1 -name '.*' -prune -o -type f \ + ! -name NEWS ! -name release.sh -print | while read file; do + sed -i "/RNetCDF\|[Vv][Ee][Rr][Ss][Ii][Oo][Nn]/ s|$oldver|$newver|g; + /Copyright.*Michna/ s|\(.*\)Copyright.*|\1$copyright|" "$file" done # Update release date in DESCRIPTION: newdate="$( date +%Y-%m-%d )" -sed "s|Date:.*|Date: $newdate|" DESCRIPTION >DESCRIPTION.sed -mv DESCRIPTION.sed DESCRIPTION +sed -i "s|Date:.*|Date: $newdate|" DESCRIPTION