diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 0a95a13c..e4154016 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -1,6 +1,6 @@ name: hdfview daily build -# Triggered on pull request or schedule or on demand +# Triggers the workflow on a schedule or on demand on: workflow_dispatch: inputs: @@ -9,8 +9,6 @@ on: type: string required: false default: check - pull_request: - branches: [ "master" ] schedule: - cron: "5 0 * * *" @@ -27,7 +25,7 @@ jobs: run-ignore: ${{ steps.getinputs.outputs.INPUTS_IGNORE }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4.1.7 - name: Get hdfview release base name uses: dsaltares/fetch-gh-release-asset@master @@ -71,13 +69,10 @@ jobs: - name: Read inputs id: getinputs run: | - echo "INPUTS_IGNORE=${{ ((github.event.inputs.use_ignore == '' && github.event.inputs.use_ignore) || 'ignore') }}" >> $GITHUB_OUTPUT - echo "INPUTS_ENVIRON=${{ ((github.event.inputs.use_environ == '' && github.event.inputs.use_environ) || 'snapshots') }}" >> $GITHUB_OUTPUT + echo "INPUTS_IGNORE=${{ github.event.inputs.use_ignore }}" >> $GITHUB_OUTPUT - run: echo "use_ignore is ${{ steps.getinputs.outputs.INPUTS_IGNORE }}." - - run: echo "use_environ is ${{ steps.getinputs.outputs.INPUTS_ENVIRON }}." - call-workflow-tarball: needs: get-base-names uses: ./.github/workflows/tarball.yml @@ -95,16 +90,16 @@ jobs: use_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }} name_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }} use_environ: snapshots - secrets: - APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }} - APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }} - KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} - AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }} - AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }} + secrets: + APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }} + APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }} + KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} + AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }} + AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }} call-workflow-ant-app: needs: [get-base-names, call-workflow-tarball] @@ -115,16 +110,16 @@ jobs: use_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }} name_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }} use_environ: snapshots - secrets: - APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }} - APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }} - KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} - AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }} - AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }} + secrets: + APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }} + APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }} + KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} + AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }} + AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }} call-workflow-release: needs: [get-base-names, call-workflow-tarball, call-workflow-ant, call-workflow-ant-app] @@ -147,5 +142,5 @@ jobs: file_base: ${{ needs.get-base-names.outputs.hdfview-name }} use_tag: HDFView-99.99.99 use_environ: snapshots - if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }} + if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) && (needs.get-base-names.outputs.hdfview-name != needs.call-workflow-tarball.outputs.file_base) }} diff --git a/.github/workflows/publish-branch.yml b/.github/workflows/publish-branch.yml index 6179ee8e..b47f9375 100644 --- a/.github/workflows/publish-branch.yml +++ b/.github/workflows/publish-branch.yml @@ -12,8 +12,9 @@ on: description: 'HDFView target bucket directory' type: string required: true - permissions: - contents: read + +permissions: + contents: read jobs: publish-tag: @@ -21,7 +22,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 with: fetch-depth: 0 ref: '${{ github.head_ref || github.ref_name }}' diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index e33acc78..3cd8afe2 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -12,8 +12,9 @@ on: description: 'HDFView target bucket directory' type: string required: true - permissions: - contents: read + +permissions: + contents: read jobs: publish-tag: @@ -21,7 +22,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 with: fetch-depth: 0 ref: '${{ github.head_ref || github.ref_name }}' @@ -50,7 +51,7 @@ jobs: ls ${{ github.workspace }}/HDFVIEW - name: Setup AWS CLI - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml index 858fbba5..37b352f4 100644 --- a/.github/workflows/release-files.yml +++ b/.github/workflows/release-files.yml @@ -40,7 +40,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 with: fetch-depth: 0 ref: '${{ github.head_ref || github.ref_name }}' @@ -73,58 +73,58 @@ jobs: # Get files created by tarball script - name: Get tgz-tarball (Linux) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: tgz-tarball path: ${{ github.workspace }} - name: Get zip-tarball (Windows) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: zip-tarball path: ${{ github.workspace }} # Get files created by ant script - name: Get published binary (Windows) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: zip-win-vs2022-binary path: ${{ github.workspace }} - name: Get published binary (MacOS) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: tgz-macos14_clang-binary path: ${{ github.workspace }} - name: Get published binary (Linux) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: tgz-ubuntu-2204-binary path: ${{ github.workspace }} # Get files created by ant-app script - name: Get published app binary (Windows) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: zip-win-vs2022-app-binary path: ${{ github.workspace }} - name: Get published app binary (MacOS) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: tgz-macos14_clang-app-binary path: ${{ github.workspace }} - name: Get published app binary (Linux) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: tgz-ubuntu-2204-app-binary path: ${{ github.workspace }} # Get files created by tarball script - name: Get UsersGuide (Linux) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: docs-usersguide path: ${{ github.workspace }}/UsersGuide @@ -160,7 +160,7 @@ jobs: echo "${{ steps.get-file-base.outputs.FILE_BASE }}" > ./last-file.txt - name: Get NEWSLETTER - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: NEWSLETTER path: ${{ github.workspace }} @@ -172,7 +172,7 @@ jobs: - name: PreRelease tag id: create_prerelease if: ${{ (inputs.use_environ == 'snapshots') }} - uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 with: tag_name: "${{ inputs.use_tag }}" prerelease: true @@ -195,7 +195,7 @@ jobs: - name: Release tag id: create_release if: ${{ (inputs.use_environ == 'release') }} - uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 with: tag_name: "${{ inputs.use_tag }}" prerelease: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c4ebd39..2dee8f0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,8 +28,6 @@ on: permissions: contents: read -# A workflow run is made up of one or more jobs that can run sequentially or -# in parallel. jobs: log-the-inputs: runs-on: ubuntu-latest @@ -66,16 +64,16 @@ jobs: name_hdf5: ${{ inputs.name_tag5 }} snap_name: HDFView-${{ needs.call-workflow-tarball.outputs.source_base }} use_environ: release - secrets: - APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }} - APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }} - KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} - AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }} - AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }} + secrets: + APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }} + APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }} + KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} + AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }} + AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }} call-workflow-ant-app: needs: [log-the-inputs, call-workflow-tarball] @@ -87,16 +85,16 @@ jobs: name_hdf5: ${{ inputs.name_tag5 }} snap_name: HDFView-${{ needs.call-workflow-tarball.outputs.source_base }} use_environ: release - secrets: - APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }} - APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }} - KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} - AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }} - AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }} + secrets: + APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }} + APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }} + KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} + AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }} + AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }} call-workflow-release: needs: [log-the-inputs, call-workflow-tarball, call-workflow-ant, call-workflow-ant-app] diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 6d898fd5..c745ddb5 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -39,8 +39,6 @@ on: permissions: contents: read -# A workflow run is made up of one or more jobs that can run sequentially or -# in parallel jobs: check_commits: name: Check for recent commits @@ -94,9 +92,10 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.7 with: path: hdfsrc + ref: '${{needs.check_commits.outputs.branch_ref }}' - name: Read VERSION file id: getversion diff --git a/src/org.hdfgroup.hdfview/hdf/view/HDFView.java b/src/org.hdfgroup.hdfview/hdf/view/HDFView.java index 5663344b..c1c32925 100644 --- a/src/org.hdfgroup.hdfview/hdf/view/HDFView.java +++ b/src/org.hdfgroup.hdfview/hdf/view/HDFView.java @@ -2810,7 +2810,7 @@ else if ("-java.version".equalsIgnoreCase(args[i])) { for (int i = args.length - j; i < args.length; i++) { tmpFile = new File(args[i]); if (!tmpFile.isAbsolute()) - tmpFile = new File(rootDir, args[i]); + tmpFile = new File(startDir, args[i]); log.trace("main: filelist - file = {} ", tmpFile.getAbsolutePath()); log.trace("main: filelist - add file = {} exists={} isFile={} isDir={}", tmpFile, tmpFile.exists(), tmpFile.isFile(), tmpFile.isDirectory());