Skip to content

Commit ddd8e0e

Browse files
authored
fix version check for pocket-id migration (#7298)
1 parent be25526 commit ddd8e0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ct/pocketid.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ function update_script() {
3030
fi
3131

3232
if check_for_gh_release "pocket-id" "pocket-id/pocket-id"; then
33-
if [[ "$(cat ~/.pocket-id)" < "1.0.0" ]]; then
33+
if [ "$(printf '%s\n%s' "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" "1.0.0" | sort -V | head -n1)" = "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" ] \
34+
&& [ "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" != "1.0.0" ]; then
3435
msg_info "Migrating ${APP}"
3536
systemctl -q disable --now pocketid-backend pocketid-frontend caddy
3637
mv /etc/caddy/Caddyfile ~/Caddyfile.bak

0 commit comments

Comments
 (0)