summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-07-18 11:27:54 (GMT)
committerGitHub <noreply@github.com>2023-07-18 11:27:54 (GMT)
commit8a364dd086df040af0bef02515f90841e0a8dc88 (patch)
tree15793ac946869dd3b029690bcb516cacdea6482c
parent7dd821c9a2a207ea9ed8b9d406da26d5ee533f0c (diff)
downloadhdf5-8a364dd086df040af0bef02515f90841e0a8dc88.zip
hdf5-8a364dd086df040af0bef02515f90841e0a8dc88.tar.gz
hdf5-8a364dd086df040af0bef02515f90841e0a8dc88.tar.bz2
Merge changes from develop (#3238)
* Merge changes from develop * Add last snapshot name * Merge bbrelease into release
-rw-r--r--.gitattributes1
-rw-r--r--.github/workflows/release-files.yml34
-rw-r--r--.github/workflows/release.yml97
-rw-r--r--.github/workflows/tarball.yml2
-rwxr-xr-xbin/bbrelease339
-rwxr-xr-xbin/release67
6 files changed, 136 insertions, 404 deletions
diff --git a/.gitattributes b/.gitattributes
index a1a7f8f..52722da 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,5 +1,4 @@
* text=auto !eol
-bin/bbrelease -text
bin/genparser -text
bin/switch_maint_mode -text
c++/src/H5OcreatProp.cpp -text
diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml
index 0f483d4..d7d95b3 100644
--- a/.github/workflows/release-files.yml
+++ b/.github/workflows/release-files.yml
@@ -53,7 +53,7 @@ jobs:
commit_sha: ${{ inputs.file_sha }}
tag: "${{ inputs.use_tag }}"
force_push_tag: true
- message: "Latest snapshot"
+ message: "Latest snapshot-1.12"
if: ${{ inputs.use_environ == 'snapshots' }}
# Print result using the action output.
@@ -114,13 +114,19 @@ jobs:
name: tgz-ubuntu-2204-binary
path: ${{ github.workspace }}
+ - name: Store snapshot name
+ run: |
+ echo "${{ steps.get-file-base.outputs.FILE_BASE }}" > ./last-file.txt
+
- name: PreRelease tag
- id: create_release
+ id: create_prerelease
+ if: ${{ (inputs.use_environ == 'snapshots') }}
uses: softprops/action-gh-release@v1
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: true
files: |
+ last-file.txt
${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
@@ -129,14 +135,22 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- - name: Store Release url
- run: |
- echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url
-
-# - uses: actions/upload-artifact@v3
-# with:
-# path: ./upload_url
-# name: upload_url
+ - name: Release tag
+ id: create_release
+ if: ${{ (inputs.use_environ == 'release') }}
+ uses: softprops/action-gh-release@v1
+ with:
+ tag_name: "${{ inputs.use_tag }}"
+ prerelease: false
+ #body_path: ${{ github.workspace }}-CHANGELOG.txt
+ files: |
+ ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip
+ ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
+ ${{ steps.get-file-base.outputs.FILE_BASE }}.zip
+ ${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz
+ ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz
+ ${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip
+ if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- name: List files for the space (Linux)
run: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 26c08a9..75352a0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,14 +9,6 @@ on:
type: string
required: false
default: snapshot-1.12
- use_environ:
- description: 'Environment to locate files'
- type: choice
- required: true
- default: snapshots
- options:
- - snapshots
- - release
permissions:
contents: read
@@ -26,38 +18,83 @@ permissions:
jobs:
log-the-inputs:
runs-on: ubuntu-latest
+ outputs:
+ rel_tag: ${{ steps.get-tag-name.outputs.RELEASE_TAG }}
steps:
- - run: |
- echo "Tag: $TAG"
- echo "Environment: $ENVIRONMENT"
- env:
- TAG: ${{ inputs.tag }}
- ENVIRONMENT: ${{ inputs.environment }}
-
- call-workflow-tarball:
+ - name: Get tag name
+ id: get-tag-name
+ env:
+ TAG: ${{ inputs.use_tag }}
+ run: echo "RELEASE_TAG=$TAG" >> $GITHUB_OUTPUT
+
+# tarball.yml will be used for releases when pre-tag actions are implemented
+# call-workflow-tarball:
+# needs: log-the-inputs
+# uses: ./.github/workflows/tarball.yml
+# with:
+# use_tag: ${{ inputs.use_tag }}
+# use_environ: release
+
+ create-files-ctest:
needs: log-the-inputs
- uses: ./.github/workflows/tarball.yml
- with:
- use_tag: ${{ inputs.use_tag }}
- use_environ: ${{ inputs.use_environ }}
+ runs-on: ubuntu-latest
+ outputs:
+ file_base: ${{ steps.set-file-base.outputs.FILE_BASE }}
+ steps:
+ - name: Set file base name
+ id: set-file-base
+ run: |
+ FILE_NAME_BASE=$(echo "${{ needs.log-the-inputs.outputs.rel_tag }}")
+ echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
+ shell: bash
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v3
+ with:
+ path: hdfsrc
+
+ - name: Zip Folder
+ run: |
+ zip -r ${{ steps.set-file-base.outputs.FILE_BASE }}.zip ./hdfsrc
+ tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz ./hdfsrc
+
+ - name: List files in the repository
+ run: |
+ ls -l ${{ github.workspace }}
+ ls $GITHUB_WORKSPACE
+
+ # Save files created by release script
+ - name: Save tgz-tarball
+ uses: actions/upload-artifact@v3
+ with:
+ name: tgz-tarball
+ path: ${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz
+ if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
+
+ - name: Save zip-tarball
+ uses: actions/upload-artifact@v3
+ with:
+ name: zip-tarball
+ path: ${{ steps.set-file-base.outputs.FILE_BASE }}.zip
+ if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
call-workflow-ctest:
- needs: call-workflow-tarball
+ needs: create-files-ctest
uses: ./.github/workflows/cmake-ctest.yml
with:
- file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
- use_tag: ${{ inputs.use_tag }}
- use_environ: ${{ inputs.use_environ }}
+ file_base: ${{ needs.create-files-ctest.outputs.file_base }}
call-workflow-release:
- needs: [call-workflow-tarball, call-workflow-ctest]
+ #needs: [call-workflow-tarball, call-workflow-ctest]
+ needs: [log-the-inputs, create-files-ctest, call-workflow-ctest]
permissions:
contents: write # In order to allow tag creation
uses: ./.github/workflows/release-files.yml
with:
- file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
- file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }}
- file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }}
- use_tag: ${{ inputs.use_tag }}
- use_environ: ${{ inputs.use_environ }}
+ file_base: ${{ needs.create-files-ctest.outputs.file_base }}
+ file_branch: ${{ needs.log-the-inputs.outputs.rel_tag }}
+ file_sha: ${{ needs.log-the-inputs.outputs.rel_tag }}
+ use_tag: ${{ needs.log-the-inputs.outputs.rel_tag }}
+ use_environ: release
diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml
index cc9a535..1f1ad24 100644
--- a/.github/workflows/tarball.yml
+++ b/.github/workflows/tarball.yml
@@ -115,7 +115,7 @@ jobs:
if: ${{ (inputs.use_environ == 'snapshots') && (needs.check_commits.outputs.has_changes == 'true') }}
run: |
cd "$GITHUB_WORKSPACE/hdfsrc"
- bin/bbrelease -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip
+ bin/release -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip
shell: bash
- name: Create release file base name
diff --git a/bin/bbrelease b/bin/bbrelease
deleted file mode 100755
index c59e2e5..0000000
--- a/bin/bbrelease
+++ /dev/null
@@ -1,339 +0,0 @@
-#!/bin/sh
-#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-
-# Make a release of hdf5.
-#
-# NOTE:
-# This script differs from bin/release in that this has an added
-# --revision option to create private releases with the code revision
-# hash in the version strings.
-#
-# This script can probably be merged into the original release script in
-# the future.
-
-# Function definitions
-#
-# Print Usage page
-USAGE()
-{
-cat << EOF
-Usage: $0 -d <dir> [-h] [--private] [--revision [--branch BRANCHNAME]] <methods> ...
- -d DIR The name of the directory where the release(s) should be
- placed.
- --branch BRANCHNAME This is to get the correct version of the branch name from the
- repository. BRANCHNAME for v1.8 should be hdf5_1_8.
- -h print the help page.
- --private Make a private release with today's date in version information.
- --revision Make a private release with the code revision number in version information.
- This allows --branch to be used for the file name.
- --branch BRANCHNAME This is to get the correct version of the branch name from the
- repository. BRANCHNAME for v1.8 should be hdf5_1_8.
-
-This must be run at the top level of the source directory.
-The other command-line options are the names of the programs to use
-for compressing the resulting tar archive (if none are given then
-"tar" is assumed):
-
- tar -- use tar and don't do any compressing.
- gzip -- use gzip with "-9" and append ".gz" to the output name.
- bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
- zip -- convert all text files to DOS style and form a zip file for Windows use.
-
-An md5 checksum is produced for each archive created and stored in the md5 file.
-
-Examples:
-
- $ bin/release -d /tmp
- /tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.md5
- /tmp/hdf5-1.8.13.tar
-
- $ bin/release -d /tmp gzip
- /tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.md5
- /tmp/hdf5-1.8.13.tar.gz
-
- $ bin/release -d /tmp tar gzip zip
- /tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.md5
- /tmp/hdf5-1.8.13.tar
- /tmp/hdf5-1.8.13.tar.gz
- /tmp/hdf5-1.8.13.tar.zip
-
-EOF
-
-}
-
-# Function name: tar2zip
-# Convert the release tarball to a Windows zipball.
-#
-# Steps:
-# 1. untar the tarball in a temporary directory;
-# Note: do this in a temporary directory to avoid changing
-# the original source directory which may be around.
-# 2. convert all its text files to DOS (LF-CR) style;
-# 3. form a zip file which is usable by Windows users.
-#
-# Parameters:
-# $1 version
-# $2 release tarball
-# $3 output zipball file name
-#
-# Returns 0 if successful; 1 otherwise
-#
-tar2zip()
-{
- if [ $# -ne 3 ]; then
- echo "usage: tar2zip <tarfilename> <zipfilename>"
- return 1
- fi
- ztmpdir=/tmp/tmpdir$$
- mkdir -p $ztmpdir
- version=$1
- tarfile=$2
- zipfile=$3
-
- # step 1: untar tarball in ztmpdir
- (cd $ztmpdir; tar xf -) < $tarfile
- # sanity check
- if [ ! -d $ztmpdir/$version ]; then
- echo "untar did not create $ztmpdir/$version source dir"
- # cleanup
- rm -rf $ztmpdir
- return 1
- fi
- # step 2: convert text files
- # There maybe a simpler way to do this.
- # options used in unix2dos:
- # -k Keep the date stamp
- # -q quiet mode
- # grep redirect output to /dev/null because -q or -s are not portable.
- find $ztmpdir/$version | \
- while read inf; do \
- if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
- unix2dos -q -k $inf; \
- fi\
- done
- # step 3: make zipball
- # -9 maximum compression
- # -y Store symbolic links as such in the zip archive
- # -r recursive
- # -q quiet
- (cd $ztmpdir; zip -9 -y -r -q $version.zip $version)
- mv $ztmpdir/$version.zip $zipfile
-
- # cleanup
- rm -rf $ztmpdir
-}
-
-# This command must be run at the top level of the hdf5 source directory.
-# Verify this requirement.
-if [ ! \( -f configure.ac -a -f bin/bbrelease \) ]; then
- echo "$0 must be run at the top level of the hdf5 source directory"
- exit 1
-fi
-
-# Defaults
-DEST=releases
-VERS=`perl bin/h5vers`
-VERS_OLD=
-test "$VERS" || exit 1
-verbose=yes
-release_date=`date +%F`
-today=`date +%Y%m%d`
-pmode='no'
-revmode='no'
-tmpdir="../#release_tmp.$$" # tmp work directory
-CPPLUS_RM_NAME=cpplus_RM
-
-# Restore previous Version information
-RESTORE_VERSION()
-{
- if [ X-${VERS_OLD} != X- ]; then
- echo restoring version information back to $VERS_OLD
- rm -f config/lt_vers.am
- cp $tmpdir/lt_vers.am config/lt_vers.am
- bin/h5vers -s $VERS_OLD
- VERS_OLD=
- fi
-}
-
-
-# Command-line arguments
-while [ -n "$1" ]; do
- arg=$1
- shift
- case "$arg" in
- -d)
- DEST=$1
- shift
- ;;
- -h)
- USAGE
- exit 0
- ;;
- --private)
- pmode=yes
- ;;
- --revision)
- revmode=yes
- ;;
- --branch)
- BRANCHNAME=$1
- shift
- ;;
- -*)
- echo "Unknown switch: $arg" 1>&2
- USAGE
- exit 1
- ;;
- *)
- methods="$methods $arg"
- ;;
- esac
-done
-
-# Default method is tar
-if [ "X$methods" = "X" ]; then
- methods="tar"
-fi
-
-# Create the temporary work directory.
-if mkdir $tmpdir; then
- echo "temporary work directory for release. "\
- "Can be deleted after release completes." > $tmpdir/README
-else
- echo "Failed to mkdir tmpdir($tmpdir)"
- exit 1
-fi
-
-# setup restoration in case of abort.
-trap RESTORE_VERSION 0
-
-if [ X$pmode = Xyes ]; then
- VERS_OLD=$VERS
- # Copy old version of config/lt_vers.am, since it's hard to
- # "undo" changes to it.
- cp config/lt_vers.am $tmpdir
- # Set version information to m.n.r-of$today.
- # (h5vers does not correctly handle just m.n.r-$today.)
- VERS=`echo $VERS | sed -e s/-.*//`-of$today
- echo Private release of $VERS
- bin/h5vers -s $VERS
-fi
-
-if [ X$revmode = Xyes ]; then
- VERS_OLD=$VERS
- echo "Save old version $VERS_OLD for restoration later."
- # Copy old version of config/lt_vers.am, since it's hard to
- # "undo" changes to it.
- cp config/lt_vers.am $tmpdir
- if [ "${BRANCHNAME}" = "" ]; then
- BRANCHNAME=`git symbolic-ref -q --short HEAD`
- fi
- revision=`git rev-parse --short HEAD`
- # Set version information to m.n.r-r$revision.
- # (h5vers does not correctly handle just m.n.r-$today.)
- VERS=`echo $VERS | sed -e s/-.*//`-$revision
- echo Private release of $VERS
- HDF5_VERS=hdf5-$BRANCHNAME-$revision
- echo file base of $HDF5_VERS
- bin/h5vers -s $VERS
- # use a generic directory name for revision releases
- HDF5_IN_VERS=hdfsrc
-else
- # Store hdf5-$VERS ("hdf5-1.7.51", e.g.) to a variable to avoid typos
- HDF5_VERS=hdf5-$VERS
- # directory name matches tar file name for non-revision releases
- HDF5_IN_VERS=$HDF5_VERS
-fi
-
-test "$verbose" && echo "Releasing $HDF5_VERS to $DEST" 1>&2
-if [ ! -d $DEST ]; then
- echo " Destination directory $DEST does not exist" 1>&2
- exit 1
-fi
-
-# Create a symlink to the source so files in the tarball have the prefix
-# we want (gnu's --transform isn't portable)
-ln -s `pwd` $tmpdir/$HDF5_IN_VERS || exit 1
-
-# Save a backup copy of Makefile if exists.
-test -f Makefile && mv Makefile $tmpdir/Makefile.x
-cp -p Makefile.dist Makefile
-
-# Update README.md and release_docs/RELEASE.txt with release information in
-# line 1.
-for f in README.md release_docs/RELEASE.txt; do
- echo "HDF5 version $VERS released on $release_date" >$f.x
- sed -e 1d $f >>$f.x
- mv $f.x $f
- # Make sure new files are of the right access mode
- chmod 644 $f
-done
-
-# Create the tar file
-test "$verbose" && echo " Running tar..." 1>&2
-(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_IN_VERS" || exit 1 )
-
-# Compress
-MD5file=$HDF5_VERS.md5
-cp /dev/null $DEST/$MD5file
-for comp in $methods; do
- case $comp in
- tar)
- cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
- (cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
- ;;
- gzip)
- test "$verbose" && echo " Running gzip..." 1>&2
- gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
- (cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
- ;;
- bzip2)
- test "$verbose" && echo " Running bzip2..." 1>&2
- bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
- (cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
- ;;
- zip)
- test "$verbose" && echo " Creating zip ball..." 1>&2
- tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
- (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
- ;;
- *)
- echo "***Error*** Unknown method $comp"
- exit 1
- ;;
- esac
-done
-
-# Copy the RELEASE.txt to the release area.
-cp release_docs/RELEASE.txt $DEST/$HDF5_VERS-RELEASE.txt
-
-# Remove distributed Makefile and restore previous Makefile if existed.
-rm -f Makefile
-test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile
-
-# Restore OLD version information, then no need for trap.
-if [ X$pmode = Xyes ] || [ X$revmode = Xyes ]; then
- echo "Restore the original version $VERS_OLD"
- RESTORE_VERSION
- trap 0
-fi
-
-# Remove temporary things
-rm -rf $tmpdir
-
-echo "DONE"
-
-exit 0
diff --git a/bin/release b/bin/release
index 9435657..d9e4f7b 100755
--- a/bin/release
+++ b/bin/release
@@ -19,14 +19,14 @@
USAGE()
{
cat << EOF
-Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--private] <methods> ...
+Usage: $0 -d <dir> [-h] [--private] [--revision [--branch BRANCHNAME]] <methods> ...
-d DIR The name of the directory where the release(s) should be
placed.
- --docver BRANCHNAME This is added for 1.8 and beyond to get the correct
- version of documentation files from the hdf5docs
+ --branch BRANCHNAME This is to get the correct version of the branch name from the
repository. BRANCHNAME for v1.8 should be hdf5_1_8.
-h print the help page.
--private Make a private release with today's date in version information.
+ --revision Make a private release with the code revision number in version information.
This must be run at the top level of the source directory.
The other command-line options are the names of the programs to use
@@ -193,19 +193,19 @@ tar2cmakezip()
fi
# step 2: add batch file for building CMake on window
- (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2013 -C Release -V -O hdf5.log" > build-VS2013-32.bat; chmod 755 build-VS2013-32.bat)
- (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201364 -C Release -V -O hdf5.log" > build-VS2013-64.bat; chmod 755 build-VS2013-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2015 -C Release -V -O hdf5.log" > build-VS2015-32.bat; chmod 755 build-VS2015-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -V -O hdf5.log" > build-VS2015-64.bat; chmod 755 build-VS2015-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -V -O hdf5.log" > build-VS2017-32.bat; chmod 755 build-VS2017-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log" > build-VS2017-64.bat; chmod 755 build-VS2017-64.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2019 -C Release -V -O hdf5.log" > build-VS2019-32.bat; chmod 755 build-VS2019-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201964 -C Release -V -O hdf5.log" > build-VS2019-64.bat; chmod 755 build-VS2019-64.bat)
+ (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2022 -C Release -V -O hdf5.log" > build-VS2022-32.bat; chmod 755 build-VS2022-32.bat)
+ (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS202264 -C Release -V -O hdf5.log" > build-VS2022-64.bat; chmod 755 build-VS2022-64.bat)
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.1-Source.zip $cmziptmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.zip $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_12_2.zip $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir
@@ -297,7 +297,7 @@ tar2cmaketgz()
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.1-Source.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_12_2.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
@@ -376,7 +376,7 @@ tar2hpccmaketgz()
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.1-Source.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_12_2.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
@@ -407,8 +407,8 @@ verbose=yes
release_date=`date +%F`
today=`date +%Y%m%d`
pmode='no'
+revmode='no'
tmpdir="../#release_tmp.$$" # tmp work directory
-DOC_URL=https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5doc.git
CPPLUS_RM_NAME=cpplus_RM
MAINT_MODE_ENABLED=""
@@ -449,8 +449,11 @@ while [ -n "$1" ]; do
--private)
pmode=yes
;;
- --docver)
- DOCVERSION=$1
+ --revision)
+ revmode=yes
+ ;;
+ --branch)
+ BRANCHNAME=$1
shift
;;
-*)
@@ -490,12 +493,34 @@ if [ X$pmode = Xyes ]; then
# (h5vers does not correctly handle just m.n.r-$today.)
VERS=`echo $VERS | sed -e s/-.*//`-of$today
echo Private release of $VERS
-else
bin/h5vers -s $VERS
fi
-# Store hdf5-$VERS ("hdf5-1.7.51", e.g.) to a variable to avoid typos
-HDF5_VERS=hdf5-$VERS
+if [ X$revmode = Xyes ]; then
+ VERS_OLD=$VERS
+ echo "Save old version $VERS_OLD for restoration later."
+ # Copy old version of config/lt_vers.am, since it's hard to
+ # "undo" changes to it.
+ cp config/lt_vers.am $tmpdir
+ if [ "${BRANCHNAME}" = "" ]; then
+ BRANCHNAME=`git symbolic-ref -q --short HEAD`
+ fi
+ revision=`git rev-parse --short HEAD`
+ # Set version information to m.n.r-r$revision.
+ # (h5vers does not correctly handle just m.n.r-$today.)
+ VERS=`echo $VERS | sed -e s/-.*//`-$revision
+ echo Private release of $VERS
+ HDF5_VERS=hdf5-$BRANCHNAME-$revision
+ echo file base of $HDF5_VERS
+ bin/h5vers -s $VERS
+ # use a generic directory name for revision releases
+ HDF5_IN_VERS=hdfsrc
+else
+ # Store hdf5-$VERS ("hdf5-1.7.51", e.g.) to a variable to avoid typos
+ HDF5_VERS=hdf5-$VERS
+ # directory name matches tar file name for non-revision releases
+ HDF5_IN_VERS=$HDF5_VERS
+fi
test "$verbose" && echo "Releasing $HDF5_VERS to $DEST" 1>&2
if [ ! -d $DEST ]; then
@@ -505,7 +530,7 @@ fi
# Create a symlink to the source so files in the tarball have the prefix
# we want (gnu's --transform isn't portable)
-ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
+ln -s `pwd` $tmpdir/$HDF5_IN_VERS || exit 1
# Save a backup copy of Makefile if exists.
test -f Makefile && mv Makefile $tmpdir/Makefile.x
@@ -521,14 +546,9 @@ for f in README.md release_docs/RELEASE.txt; do
chmod 644 $f
done
-# develop is different than branches.
-if [ "${DOCVERSION}" ]; then
- DOC_URL="$DOC_URL -b ${DOCVERSION}"
-fi
-
# Create the tar file
test "$verbose" && echo " Running tar..." 1>&2
-(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_VERS" || exit 1 )
+(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_IN_VERS" || exit 1 )
# Compress
SHA256=$HDF5_VERS.sha256
@@ -561,7 +581,7 @@ for comp in $methods; do
;;
zip)
test "$verbose" && echo " Creating zip ball..." 1>&2
- tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
+ tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
(cd $DEST; sha256sum $HDF5_VERS.zip >> $SHA256)
;;
cmake-zip)
@@ -607,7 +627,8 @@ rm -f Makefile
test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile
# Restore OLD version information, then no need for trap.
-if [ X$pmode = Xyes ]; then
+if [ X$pmode = Xyes ] || [ X$revmode = Xyes ]; then
+ echo "Restore the original version $VERS_OLD"
RESTORE_VERSION
trap 0
fi