Skip to content

Commit e38d145

Browse files
committed
Prevent formatting issues when hashing
1 parent 040f99d commit e38d145

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Get source hash
6565
id: source-hash
6666
run: |
67-
hash=$(git ls-tree -r HEAD --name-only Source Plugins JuceLibraryCode CMakeLists.txt HelperFunctions.cmake | git hash-object --stdin-paths | cut -c1-16)
67+
hash=$(git ls-tree -r HEAD --name-only Source Plugins JuceLibraryCode CMakeLists.txt HelperFunctions.cmake | git hash-object --stdin-paths | cut -c1-16 | tr -d '\n')
6868
echo "hash=$hash" >> $GITHUB_OUTPUT
6969
shell: bash
7070
- name: Restore build cache
@@ -97,9 +97,9 @@ jobs:
9797
id: plugin-hashes
9898
shell: bash
9999
run: |
100-
data_format_hash=$(git ls-remote https://github.com/open-ephys-plugins/open-ephys-data-format.git main | cut -f1 | cut -c1-16)
101-
hdf5_hash=$(git ls-remote https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git main | cut -f1 | cut -c1-16)
102-
nwb_hash=$(git ls-remote https://github.com/open-ephys-plugins/nwb-format.git main | cut -f1 | cut -c1-16)
100+
data_format_hash=$(git ls-remote https://github.com/open-ephys-plugins/open-ephys-data-format.git main | cut -f1 | cut -c1-16 | tr -d '\n')
101+
hdf5_hash=$(git ls-remote https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git main | cut -f1 | cut -c1-16 | tr -d '\n')
102+
nwb_hash=$(git ls-remote https://github.com/open-ephys-plugins/nwb-format.git main | cut -f1 | cut -c1-16 | tr -d '\n')
103103
echo "data-format=$data_format_hash" >> $GITHUB_OUTPUT
104104
echo "hdf5=$hdf5_hash" >> $GITHUB_OUTPUT
105105
echo "nwb=$nwb_hash" >> $GITHUB_OUTPUT
@@ -217,7 +217,7 @@ jobs:
217217
shell: powershell
218218
id: timestamp
219219
run: |
220-
$timestamp = Get-Date -Format 'yyyy_MM_dd_HH_mm_ss'
220+
$timestamp = (Get-Date -Format 'yyyy_MM_dd_HH_mm_ss').Trim()
221221
"timestamp=$timestamp" >> $env:GITHUB_OUTPUT
222222
- name: Upload test results
223223
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)