-
Notifications
You must be signed in to change notification settings - Fork 0
Integrate SHA256 checksums into build and release workflow with GitHub Actions enhancement #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d293956
Initial plan
Copilot 311b15f
Update copilot instructions for v0.4.8.6 - Go version, counts, and ne…
Copilot 58c636b
Update copilot instructions for v0.4.8.6
go-while 5955036
readme and workflow updates
go-while 31f4624
Initial plan
Copilot 26a8aa7
Add SHA256 checksums generation for individual executables
Copilot 051e975
Add SHA256 checksums generation for individual executables
Copilot f8a18fe
Enhance build workflow integration with automatic checksum generation
Copilot 202dcae
Enhance GitHub Actions workflow to include SHA256 checksums as separa…
Copilot 2671930
Remove Go cache module from GitHub Actions workflow to eliminate cach…
Copilot 37de4c4
Update createChecksums.sh
go-while File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2cc6dbd00dc59836970e79b6ed101020c952164e222a52c6a0694294d8da5bfb update.tar.gz | ||
3e20a56cf38c0b7be78fb3791dacccf4a9b59f6127c55bc6fb1ca9999d266958 update.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/sh -e | ||
|
||
# Generate SHA256 checksums for all executables in build directory | ||
|
||
BUILD_DIR="build" | ||
CHECKSUMS_FILE="checksums.sha256" | ||
|
||
echo "Generating SHA256 checksums for executables in $BUILD_DIR/" | ||
|
||
# Check if build directory exists | ||
if [ ! -d "$BUILD_DIR" ]; then | ||
echo "Error: Build directory '$BUILD_DIR' not found" | ||
echo "Please run ./build_ALL.sh first to build all executables" | ||
exit 1 | ||
fi | ||
|
||
# Check if there are any files in build directory | ||
if [ ! "$(ls -A $BUILD_DIR)" ]; then | ||
go-while marked this conversation as resolved.
Show resolved
Hide resolved
go-while marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "Error: Build directory '$BUILD_DIR' is empty" | ||
echo "Please run ./build_ALL.sh first to build all executables" | ||
exit 1 | ||
fi | ||
|
||
# Remove existing checksums file | ||
rm -f "$CHECKSUMS_FILE" | ||
|
||
# Generate checksums for all files in build directory | ||
echo "Creating $CHECKSUMS_FILE with SHA256 hashes..." | ||
sha256sum "$BUILD_DIR"/* > "$CHECKSUMS_FILE" | ||
go-while marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Also create a version with relative paths for inclusion in the release archive | ||
cd "$BUILD_DIR" | ||
sha256sum * > "../${CHECKSUMS_FILE}.archive" | ||
cd .. | ||
|
||
# Display the checksums file | ||
echo "" | ||
echo "Checksums generated successfully:" | ||
echo "=================================" | ||
cat "$CHECKSUMS_FILE" | ||
|
||
echo "" | ||
echo "Checksums file created: $CHECKSUMS_FILE" | ||
echo "Archive checksums file created: ${CHECKSUMS_FILE}.archive (for inclusion in release)" | ||
echo "Number of executables: $(wc -l < $CHECKSUMS_FILE)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
#!/bin/sh -e | ||
# Generate checksums for individual executables | ||
echo "Generating checksums for individual executables..." | ||
./createChecksums.sh | ||
|
||
# Copy archive checksums file into build directory for inclusion in release archive | ||
echo "Including checksums in release archive..." | ||
cp checksums.sha256.archive build/checksums.sha256 | ||
|
||
rm -f update.tar.gz | ||
tar -f update.tar.gz -C build -c -v -z . | ||
sha256sum update.tar.gz > .update | ||
HASH=$(cat .update|cut -d" " -f1) | ||
du -b update.tar.gz | ||
cat .update | ||
echo "" | ||
echo "Release archive created with individual executable checksums included" | ||
echo "Individual executable checksums available in: checksums.sha256" | ||
echo "Checksums are also included in the release archive as checksums.sha256" | ||
exit 0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.