From b53285ad497d56513b949c254980f1b459f28c82 Mon Sep 17 00:00:00 2001 From: xonixx Date: Fri, 13 Dec 2024 02:33:55 +0200 Subject: [PATCH] selfupdate is broken #174 : switch to commits strategy --- makesure | 2 +- makesure.awk | 2 +- makesure_candidate | 2 +- tests/200_update.sh | 3 +++ tests/200_update.tush | 5 +++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/makesure b/makesure index 39877ae..b45b2c2 100755 --- a/makesure +++ b/makesure @@ -498,7 +498,7 @@ function selfUpdate(tmp,err,newVer,line,sha){ err=dl("https://github.com/xonixx/makesure/commits/main",tmp) if(!err){ while(getline line "$D/$cmd" diff --git a/tests/200_update.tush b/tests/200_update.tush index e4d2b84..43ff0e1 100644 --- a/tests/200_update.tush +++ b/tests/200_update.tush @@ -3,6 +3,7 @@ $ ./$MAKESURE -f tests/200_update.sh test_err | goal 'makesure_prepared' ... | goal 'test_err' ... | XXX +| selfupdate 1 | goal 'test_err' failed @ wget/curl not found @ Please use manual update: https://makesure.dev/Installation.html @@ -13,9 +14,11 @@ $ ./$MAKESURE -f tests/200_update.sh test_wget | awk '{ sub(/[0-9][0-9.]+/,"YYY" | goal 'wget_prepared' ... | goal 'test_wget' ... | XXX +| selfupdate 1 | running wget | running wget | updated XXX -> YYY +| selfupdate 2 | running wget | running wget | you have latest version YYY installed @@ -26,9 +29,11 @@ $ ./$MAKESURE -f tests/200_update.sh test_curl | awk '{ sub(/[0-9][0-9.]+/,"YYY" | goal 'curl_prepared' ... | goal 'test_curl' ... | XXX +| selfupdate 1 | running curl | running curl | updated XXX -> YYY +| selfupdate 2 | running curl | running curl | you have latest version YYY installed