Skip to content

Commit

Permalink
Add back snapshot names (#4198)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Mar 21, 2024
1 parent 4ebfbd6 commit 0e179d1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
call-workflow-tarball:
uses: ./.github/workflows/tarball.yml
with:
#use_tag: snapshot
use_tag: snapshot
use_environ: snapshots

call-workflow-ctest:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
needs: log-the-inputs
uses: ./.github/workflows/tarball.yml
with:
# use_tag: ${{ inputs.use_tag }}
use_tag: ${{ inputs.use_tag }}
use_environ: release

call-workflow-ctest:
Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ name: hdf5 dev tarball
on:
workflow_call:
inputs:
# use_tag:
# description: 'Release version tag'
# type: string
# required: false
# default: snapshot
use_tag:
description: 'Release version tag'
type: string
required: false
default: snapshot
use_environ:
description: 'Environment to locate files'
type: string
Expand Down Expand Up @@ -105,7 +105,12 @@ jobs:
then
FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}")
else
FILE_NAME_BASE=$(echo "hdf5-${{ steps.version.outputs.TAG_VERSION }}")
if [[ '${{ inputs.use_tag }}' == 'snapshot' ]]
then
FILE_NAME_BASE=$(echo "${{ inputs.use_tag }}")
else
FILE_NAME_BASE=$(echo "hdf5-${{ steps.version.outputs.TAG_VERSION }}")
fi
fi
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
shell: bash
Expand All @@ -120,10 +125,18 @@ jobs:

- name: Create release file base name
id: create-rel-base
if: ${{ (inputs.use_environ == 'release') }}
if: ${{ (inputs.use_environ == 'release') && (inputs.use_tag != 'snapshot') }}
run: |
cd "$GITHUB_WORKSPACE/hdfsrc"
bin/release -d $GITHUB_WORKSPACE gzip zip
shell: bash

- name: Create snapshot file base name
id: create-snap-base
if: ${{ (inputs.use_tag == 'snapshot') && (inputs.use_environ == 'release') }}
run: |
cd "$GITHUB_WORKSPACE/hdfsrc"
bin/release -d $GITHUB_WORKSPACE gzip zip cmake-tgz cmake-zip
bin/release -d $GITHUB_WORKSPACE --branch ${{ inputs.use_tag }} gzip zip
shell: bash

- name: List files in the repository
Expand Down

0 comments on commit 0e179d1

Please sign in to comment.