Merge pull request #120 from stripedpajamas/sums
Add hash digests to releases
This commit is contained in:
commit
a47dcab06a
3 changed files with 47 additions and 15 deletions
|
@ -27,6 +27,7 @@ script:
|
|||
|
||||
before_deploy:
|
||||
- ./create_zip.sh
|
||||
- ./sum.sh
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
|
@ -36,6 +37,7 @@ deploy:
|
|||
api_key: $GITHUB_TOKEN
|
||||
file_glob: true
|
||||
file:
|
||||
- ./*.sha256
|
||||
- ./*.zip
|
||||
- ./*.tar.gz
|
||||
- vscode/.build/linux/deb/i386/deb/*.deb
|
||||
|
|
26
sum.sh
Executable file
26
sum.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
sum_file () {
|
||||
if [[ -f "$1" ]]; then
|
||||
shasum -a 256 $1 > $1.sha256
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "$SHOULD_BUILD" == "yes" ]]; then
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
sum_file VSCodium-darwin-*.zip
|
||||
else # linux
|
||||
if [[ "$BUILDARCH" == "x64" ]]; then
|
||||
deb_arch=amd64
|
||||
rpm_arch=x86_64
|
||||
elif [[ "$BUILDARCH" == "ia32" ]]; then
|
||||
deb_arch=i386
|
||||
rpm_arch=i386
|
||||
fi
|
||||
sum_file VSCodium-linux*.tar.gz
|
||||
sum_file vscode/.build/linux/deb/${deb_arch}/deb/*.deb
|
||||
sum_file vscode/.build/linux/rpm/${rpm_arch}/*.rpm
|
||||
cp vscode/.build/linux/deb/${deb_arch}/deb/*.sha256 .
|
||||
cp vscode/.build/linux/rpm/${rpm_arch}/*.sha256 .
|
||||
fi
|
||||
fi
|
|
@ -39,21 +39,25 @@ steps:
|
|||
- bash: |
|
||||
if [[ "$SHOULD_BUILD" == "yes" ]]; then mv vscode\\.build\\win32-$(BUILDARCH)\\archive\\VSCode-win32-$(BUILDARCH).zip VSCodium-win32-$(BUILDARCH)-${LATEST_MS_TAG}.zip; fi
|
||||
displayName: 'move the zip folder'
|
||||
- powershell: |
|
||||
Get-FileHash VSCodiumSetup-$(BUILDARCH)-$(LATEST_MS_TAG).exe -Algorithm SHA256 | Format-List > VSCodiumSetup-$(BUILDARCH)-$(LATEST_MS_TAG).sha256
|
||||
Get-FileHash VSCodiumUserSetup-$(BUILDARCH)-$(LATEST_MS_TAG).exe -Algorithm SHA256 | Format-List > VSCodiumUserSetup-$(BUILDARCH)-$(LATEST_MS_TAG).sha256
|
||||
Get-FileHash VSCodium-win32-$(BUILDARCH)-$(LATEST_MS_TAG).zip -Algorithm SHA256 | Format-List > VSCodium-win32-$(BUILDARCH)-$(LATEST_MS_TAG).sha256
|
||||
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
||||
displayName: 'compute sums'
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
contents: |
|
||||
VSCodium*.zip
|
||||
VSCodiumUserSetup*.exe
|
||||
VSCodiumSetup*.exe
|
||||
*.sha256
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
||||
displayName: 'copy artifacts to staging directory'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish artifacts: system-setup'
|
||||
displayName: 'Publish artifacts'
|
||||
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
||||
inputs:
|
||||
PathtoPublish: 'VSCodiumSetup-$(BUILDARCH)-$(LATEST_MS_TAG).exe'
|
||||
ArtifactName: 'system_setup'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish artifacts: user-setup'
|
||||
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
||||
inputs:
|
||||
PathtoPublish: 'VSCodiumUserSetup-$(BUILDARCH)-$(LATEST_MS_TAG).exe'
|
||||
ArtifactName: 'user_setup'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish artifacts: archive'
|
||||
condition: eq(variables['SHOULD_BUILD'], 'yes')
|
||||
inputs:
|
||||
PathtoPublish: 'VSCodium-win32-$(BUILDARCH)-$(LATEST_MS_TAG).zip'
|
||||
ArtifactName: 'archive'
|
||||
PathtoPublish: $(Build.ArtifactStagingDirectory)
|
||||
ArtifactName: 'everything'
|
||||
|
|
Loading…
Reference in a new issue