2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 19:31:35 +00:00

Update manifest, deploy

This commit is contained in:
Aode (lion) 2021-09-06 15:26:30 -05:00
parent 985d12a59a
commit c959399c56
2 changed files with 19 additions and 16 deletions

View file

@ -78,8 +78,8 @@ build_image $new_tag amd64 $push
# TODO # TODO
if [ "$push" == "true" ]; then if [ "$push" == "true" ]; then
./manifest.sh $new_tag ./manifest.sh pictrs $new_tag
./manifest.sh latest ./manifest.sh pictrs latest
pushd ../../ pushd ../../
cargo publish cargo publish

View file

@ -11,30 +11,33 @@ function print_help() {
echo "deploy.sh" echo "deploy.sh"
echo "" echo ""
echo "Usage:" echo "Usage:"
echo " manifest.sh [tag]" echo " manifest.sh [repo] [tag]"
echo "" echo ""
echo "Args:" echo "Args:"
echo " repo: The docker repository to update"
echo " tag: The git tag to be applied to the image manifest" echo " tag: The git tag to be applied to the image manifest"
} }
new_tag=$1 REPO=$1
TAG=$2
require "$new_tag" "tag" require "$REPO" "repo"
require "$TAG" "tag"
set -xe set -xe
sudo docker manifest create asonix/pictrs:$new_tag \ sudo docker manifest create asonix/$REPO:$TAG \
-a asonix/pictrs:arm64v8-$new_tag \ -a asonix/$REPO:arm64v8-$TAG \
-a asonix/pictrs:arm32v7-$new_tag \ -a asonix/$REPO:arm32v7-$TAG \
-a asonix/pictrs:amd64-$new_tag -a asonix/$REPO:amd64-$TAG
sudo docker manifest annotate asonix/pictrs:$new_tag \ sudo docker manifest annotate asonix/$REPO:$TAG \
asonix/pictrs:arm64v8-$new_tag --os linux --arch arm64 --variant v8 asonix/$REPO:arm64v8-$TAG --os linux --arch arm64 --variant v8
sudo docker manifest annotate asonix/pictrs:$new_tag \ sudo docker manifest annotate asonix/$REPO:$TAG \
asonix/pictrs:arm32v7-$new_tag --os linux --arch arm --variant v7 asonix/$REPO:arm32v7-$TAG --os linux --arch arm --variant v7
sudo docker manifest annotate asonix/pictrs:$new_tag \ sudo docker manifest annotate asonix/$REPO:$TAG \
asonix/pictrs:amd64-$new_tag --os linux --arch amd64 asonix/$REPO:amd64-$TAG --os linux --arch amd64
sudo docker manifest push asonix/pictrs:$new_tag --purge sudo docker manifest push asonix/$REPO:$TAG --purge