Log hashes of executables as notice messages
This commit is contained in:
		
					parent
					
						
							
								11e9581a25
							
						
					
				
			
			
				commit
				
					
						e821dd4e94
					
				
			
		
					 2 changed files with 7 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -20,8 +20,6 @@ case "${NETWORK}" in
 | 
			
		|||
esac
 | 
			
		||||
 | 
			
		||||
if [[ -n "${S3_BUILD_DIRECTORY}" ]]; then
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    DIRECTORY="${S3_BUILD_DIRECTORY}/${BUILD}"
 | 
			
		||||
else
 | 
			
		||||
    DIRECTORY=$BUILD
 | 
			
		||||
| 
						 | 
				
			
			@ -33,7 +31,7 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then
 | 
			
		|||
 | 
			
		||||
    for rpm in $RPMS; do
 | 
			
		||||
        SHA=$(sha256sum ${rpm})
 | 
			
		||||
        echo "Hash: $SHA"
 | 
			
		||||
        echo "::notice::Hash: $SHA"
 | 
			
		||||
        echo $SHA > ${GITHUB_WORKSPACE}/$(basename "${rpm}.sha256")
 | 
			
		||||
 | 
			
		||||
        aws s3 cp ${rpm} s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/$(basename "${rpm}") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
 | 
			
		||||
| 
						 | 
				
			
			@ -42,7 +40,7 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then
 | 
			
		|||
    
 | 
			
		||||
    for srpm in $SRPMS; do
 | 
			
		||||
        SHA=$(sha256sum ${srpm})
 | 
			
		||||
        echo "Hash: $SHA"
 | 
			
		||||
        echo "::notice::Hash: $SHA"
 | 
			
		||||
        echo $SHA > ${GITHUB_WORKSPACE}/$(basename "${srpm}).sha256")
 | 
			
		||||
 | 
			
		||||
        aws s3 cp ${srpm} s3://${S3_BUCKET_NAME}/$DIRECTORY/source/$(basename "${srpm}") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
 | 
			
		||||
| 
						 | 
				
			
			@ -50,11 +48,11 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then
 | 
			
		|||
    done
 | 
			
		||||
elif [[ "$OS" == 'Linux' ]]; then
 | 
			
		||||
    SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2)
 | 
			
		||||
    echo "Hash: $SHA"
 | 
			
		||||
    echo "::notice::Hash: $SHA"
 | 
			
		||||
    echo $SHA >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.tar.bz2.sha256
 | 
			
		||||
 | 
			
		||||
    SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.deb)
 | 
			
		||||
    echo "Hash: $SHA"
 | 
			
		||||
    echo "::notice::Hash: $SHA"
 | 
			
		||||
    echo $SHA >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.deb.sha256
 | 
			
		||||
 | 
			
		||||
    aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2 s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Linux.tar.bz2 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
 | 
			
		||||
| 
						 | 
				
			
			@ -63,7 +61,7 @@ elif [[ "$OS" == 'Linux' ]]; then
 | 
			
		|||
    aws s3 cp $GITHUB_WORKSPACE/nano-node-$TAG-Linux.deb.sha256 s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Linux.deb.sha256 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
 | 
			
		||||
else
 | 
			
		||||
    SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg)
 | 
			
		||||
    echo "Hash: $SHA"
 | 
			
		||||
    echo "::notice::Hash: $SHA"
 | 
			
		||||
    echo $SHA >$GITHUB_WORKSPACE/build/nano-node-$TAG-Darwin.dmg.sha256
 | 
			
		||||
 | 
			
		||||
    aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Darwin.dmg --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,8 +27,8 @@ $zip_hash = ((Get-FileHash $zip).hash)+" "+(split-path -Path $zip -Resolve -leaf
 | 
			
		|||
$exe_hash | Out-file -FilePath "$exe.sha256"
 | 
			
		||||
$zip_hash | Out-file -FilePath "$zip.sha256"
 | 
			
		||||
 | 
			
		||||
Write-Output "Hash: $exe_hash"
 | 
			
		||||
Write-Output "Hash: $zip_hash"
 | 
			
		||||
Write-Output "::notice::Hash: $exe_hash"
 | 
			
		||||
Write-Output "::notice::Hash: $zip_hash"
 | 
			
		||||
 | 
			
		||||
aws s3 cp "$exe" s3://$env:S3_BUCKET_NAME/$directory/binaries/nano-node-$env:TAG-win64.exe --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
 | 
			
		||||
aws s3 cp "$exe.sha256" s3://$env:S3_BUCKET_NAME/$directory/binaries/nano-node-$env:TAG-win64.exe.sha256 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue