mirror of
https://github.com/rancher/os.git
synced 2025-07-17 16:41:04 +00:00
Merge pull request #1772 from rancher/add-checksums-for-all-files
Add a checksum for all files
This commit is contained in:
commit
7e30bb9983
21
scripts/ci
21
scripts/ci
@ -16,22 +16,39 @@ echo PACKAGE
|
|||||||
echo INTEGRATION-TEST
|
echo INTEGRATION-TEST
|
||||||
./scripts/integration-test
|
./scripts/integration-test
|
||||||
|
|
||||||
|
CHECKSUM="dist/checksums.txt"
|
||||||
|
rm -f $CHECKSUM
|
||||||
|
|
||||||
cat scripts/hosting/rancheros.ipxe | sed "s/latest/${VERSION}/g" > dist/artifacts/rancheros.ipxe
|
cat scripts/hosting/rancheros.ipxe | sed "s/latest/${VERSION}/g" > dist/artifacts/rancheros.ipxe
|
||||||
|
|
||||||
echo "github-release release --user rancher --repo os --tag ${VERSION} --pre-release --draft" > dist/publish.sh
|
echo "github-release release --user rancher --repo os --tag ${VERSION} --pre-release --draft" > dist/publish.sh
|
||||||
chmod 755 dist/publish.sh
|
chmod 755 dist/publish.sh
|
||||||
|
|
||||||
for file in $(ls dist/artifacts/); do
|
for file in $(ls dist/artifacts/); do
|
||||||
if [[ "$file" != *"installer.tar" ]]; then
|
if [[ "$file" == *"installer.tar" ]]; then
|
||||||
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name ${file}" >> dist/publish.sh
|
continue
|
||||||
fi
|
fi
|
||||||
|
if [[ "$file" == "Dockerfile"* ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name ${file}" >> dist/publish.sh
|
||||||
if [[ "$file" == "initrd-"* ]]; then
|
if [[ "$file" == "initrd-"* ]]; then
|
||||||
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name initrd" >> dist/publish.sh
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name initrd" >> dist/publish.sh
|
||||||
fi
|
fi
|
||||||
if [[ "$file" == "vmlinuz-"* ]]; then
|
if [[ "$file" == "vmlinuz-"* ]]; then
|
||||||
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name vmlinuz" >> dist/publish.sh
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name vmlinuz" >> dist/publish.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#checksums
|
||||||
|
pushd .
|
||||||
|
cd dist/artifacts
|
||||||
|
for algo in sha256 md5; do
|
||||||
|
echo "$algo: $(${algo}sum $file)" >> ../../$CHECKSUM
|
||||||
|
done
|
||||||
|
popd
|
||||||
done
|
done
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ${CHECKSUM} --name checksums.txt" >> dist/publish.sh
|
||||||
|
|
||||||
echo >> dist/publish.sh
|
echo >> dist/publish.sh
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user