Browse Source

fix(ci): build go-latest asset for every main commit and clarify update fallback

gnacho 3 months ago
parent
commit
9e978d269c
2 changed files with 6 additions and 5 deletions
  1. 5 4
      .github/workflows/go.yml
  2. 1 1
      deploy/update.sh

+ 5 - 4
.github/workflows/go.yml

@@ -5,13 +5,14 @@ name: go-server
 # updater descarga el binario exacto de su commit:
 # netpulse-server-<sha>-linux-<arch>.tar.gz).
 
+# Sin filtro de rutas (#471): si un push a main no toca server-go/ ni app/
+# no se publica asset de ese SHA, y el updater del CT se queda ofreciendo una
+# actualización imposible (cae al asset más viejo y current != latest para
+# siempre). Con este trigger, CADA SHA de main tiene su binario en go-latest.
+
 on:
   push:
     branches: [main]
-    paths:
-      - 'server-go/**'
-      - 'app/**' # el dist va embebido en el binario
-      - '.github/workflows/go.yml'
   workflow_dispatch:
 
 jobs:

+ 1 - 1
deploy/update.sh

@@ -101,7 +101,7 @@ if [ -f "$SERVER_BIN" ]; then
   if ! curl -fsSL -m 300 "https://github.com/gnacho/netpulse/releases/download/go-latest/$ASSET" -o /tmp/netpulse-go.tgz; then
     ASSET=$(grep -oP '"name":\s*"\Knetpulse-server-[0-9a-f]+-linux-'"$ARCH"'\.tar\.gz' "$RELEASE_JSON" 2>/dev/null | head -1)
     if [ -n "$ASSET" ] && curl -fsSL -m 300 "https://github.com/gnacho/netpulse/releases/download/go-latest/$ASSET" -o /tmp/netpulse-go.tgz; then
-      echo "binario de CI más reciente disponible ($ASSET)"
+      echo "aviso (#471): sin asset para el commit $SHA; instalando el más reciente ($ASSET). El updater seguirá ofreciendo actualización hasta que main publique un asset propio de su SHA."
     else
       echo "ERROR: sin binario en CI para $ARCH (el CT no puede compilar Go)"
       exit 1