2023-11-14 23:04:56 +09:00
|
|
|
#!/bin/sh
|
2023-11-12 05:31:20 +09:00
|
|
|
set -eu
|
|
|
|
|
2023-11-14 23:04:56 +09:00
|
|
|
. neko/update/utils
|
2023-11-12 05:31:20 +09:00
|
|
|
|
|
|
|
pull() {
|
2023-11-18 16:37:55 +09:00
|
|
|
say 'Pulling the image...'
|
2024-01-05 08:03:42 +09:00
|
|
|
run "$1 pull registry.code.naskya.net/naskya/firefish"
|
2023-11-12 05:31:20 +09:00
|
|
|
}
|
|
|
|
|
2024-01-05 08:03:42 +09:00
|
|
|
if ! pull "$1"; then
|
2024-01-05 14:41:00 +09:00
|
|
|
sadsay 'awawa, the image may not be compatible with your environment...'
|
2023-11-18 16:37:55 +09:00
|
|
|
say 'Gonnya try building the image locally!'
|
2023-11-17 16:25:39 +09:00
|
|
|
|
2023-11-18 16:37:55 +09:00
|
|
|
say 'It takes some time! Why not brew a cup of cofe?'
|
2023-11-21 03:23:06 +09:00
|
|
|
run "$(cat - << EOC
|
2024-01-05 08:03:42 +09:00
|
|
|
$1 build --tag registry.code.naskya.net/naskya/firefish --build-arg VERSION="$(version)" .
|
2023-11-21 03:23:06 +09:00
|
|
|
EOC
|
|
|
|
)"
|
2023-11-12 05:31:20 +09:00
|
|
|
fi
|
|
|
|
|
2023-11-18 16:37:55 +09:00
|
|
|
say 'Done!'
|