Skip to content

Commit cc9703f

Browse files
authored
Merge unix and windows SHA files into one (#3915)
## Changes Merge unix and windows SHA files into one ## Why The Komac tool (and any other tools expecting a unified checksum file) will now find the correct checksums in the standard databricks_cli_{{ .Version }}_SHA256SUMS file that contains entries for all platforms.
1 parent ff512cc commit cc9703f

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,43 @@ jobs:
132132
name: windows-artifacts
133133
path: dist
134134

135+
- name: Download Unix checksum file from release
136+
run: |
137+
VERSION=${{ github.ref_name }}
138+
VERSION_NO_V=${VERSION:1}
139+
140+
echo "Downloading Unix checksum file..."
141+
gh release download ${{ github.ref_name }} \
142+
--pattern "databricks_cli_${VERSION_NO_V}_SHA256SUMS_unix" \
143+
--dir dist \
144+
--repo ${{ github.repository }}
145+
env:
146+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147+
148+
- name: Merge checksum files
149+
run: |
150+
VERSION=${{ github.ref_name }}
151+
VERSION_NO_V=${VERSION:1}
152+
153+
echo "Merging Unix and Windows checksum files..."
154+
cat dist/databricks_cli_${VERSION_NO_V}_SHA256SUMS_unix > dist/databricks_cli_${VERSION_NO_V}_SHA256SUMS
155+
cat dist/databricks_cli_${VERSION_NO_V}_SHA256SUMS_windows >> dist/databricks_cli_${VERSION_NO_V}_SHA256SUMS
156+
157+
echo "Merged SHA256SUMS file contents:"
158+
cat dist/databricks_cli_${VERSION_NO_V}_SHA256SUMS
159+
160+
- name: Verify checksums after download
161+
run: |
162+
echo "Verifying Windows artifact checksums after download..."
163+
for file in dist/*.zip; do
164+
if [ -f "$file" ]; then
165+
sha256sum "$file"
166+
fi
167+
done
168+
135169
- name: Upload to GitHub release
136170
run: |
137-
for file in dist/*.zip dist/*SHA256SUMS*; do
171+
for file in dist/*.zip dist/*SHA256SUMS; do
138172
if [ -f "$file" ]; then
139173
echo "Uploading $(basename $file)"
140174
gh release upload ${{ github.ref_name }} "$file" --repo ${{ github.repository }}

0 commit comments

Comments
 (0)