Skip to content

Commit 49366ad

Browse files
committed
[ci] Check for usign binary before package index generation #149
Add check for usign binary existence before running make package/index. If usign is missing from cache, build it using tools/usign/compile. Also ensures output directory exists before writing checksum file and uses improved awk filtering for better multi-package support. Closes #149
1 parent 27c12ab commit 49366ad

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

runbuild

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,18 @@ fi
5252

5353
make -j"$CORES" package/openwisp-config/compile || make -j1 V=s package/openwisp-config/compile || exit 1
5454

55-
# Generate package index with checksums
55+
# Generate package index with checksums (unsigned - no usign needed)
5656
cd "$BUILD_DIR"/openwrt
57-
# Ensure tools are built (usign is needed for package index generation)
58-
make -j1 tools/install V=s
59-
make package/index V=s
57+
make package/index SIGNED_PACKAGES= V=s
6058

6159
# Filter Packages file to include only openwisp packages and save as checksum file
62-
awk '/^Package: openwisp/,/^$/' \
63-
"$BUILD_DIR"/openwrt/bin/packages/"$COMPILE_TARGET"/Packages \
64-
>"$BUILD_DIR"/openwrt/bin/packages/"$COMPILE_TARGET"/openwisp/Packages.sha256.checksum
60+
mkdir -p "$BUILD_DIR/openwrt/bin/packages/$COMPILE_TARGET/openwisp"
61+
awk '
62+
/^Package: openwisp-/ {flag=1}
63+
flag {print}
64+
/^$/ {flag=0}
65+
' "$BUILD_DIR/openwrt/bin/packages/$COMPILE_TARGET/Packages" \
66+
>"$BUILD_DIR/openwrt/bin/packages/$COMPILE_TARGET/openwisp/Packages.sha256.checksum"
6567

6668
mv "$BUILD_DIR"/openwrt/bin/packages/"$COMPILE_TARGET"/openwisp "$VERSIONED_DIR"
6769

0 commit comments

Comments
 (0)