Closed radiosilence closed 6 months ago
so i took a look at your manifest shell script and at least for me I needed to set the PKGVERSION like so:
index 0b2131e..f2aa8c9 100755
--- a/scripts/make-manifest.sh
+++ b/scripts/make-manifest.sh
@@ -1,5 +1,6 @@
#!/bin/bash
PKGNAME="nano-web"
+PKGVERSION=$(./scripts/get-version.sh)
the Version wasn't getting put into the package.manifest w/out:
➜ nano-web git:(main) ✗ cat release/nano-web_0.1.2-1/package.manifest
{
"Program":"nano-web_0.1.2-1/nano-web",
"Args" : ["nano-web"],
"Version":"0.1.2-1"
}
also, fyi - there is a cmd 'ops pkg from-run g --name nano-web --version 0.1.1 -c config.json' that would remove a lot of these manual steps
The PKGVERSION was indeed getting set from my shell's env, so I've modified my makefile to set it explicitly now!
However this issue was caused by a bug in the regex due to the dash in the package name! See PR :)
Updated Makefile
PKGNAME=nano-web
PKGVERSION:=$(shell ./scripts/get-version.sh)
PKGRELEASE=$(PKGNAME)_$(PKGVERSION)
RELEASEDIR=./release
PKGDIR=$(RELEASEDIR)/$(PKGRELEASE)
pkg-clean:
rm -rf $(RELEASEDIR)
pkg-build:
GOOS=linux go build -o $(PKGDIR)/$(PKGNAME) main.go
pkg-create: pkg-clean
mkdir -p $(PKGDIR)/sysroot
mkdir -p $(PKGDIR)/sysroot/public
PKGVERSION=$(PKGVERSION) PKGNAME=$(PKGNAME) ./scripts/make-manifest.sh > $(PKGDIR)/package.manifest
cp README.md $(PKGDIR)
pkg-add: pkg-create pkg-build
ops pkg add $(PKGDIR) --name $(PKGRELEASE)
pkg-bundle: pkg-add
cd $(RELEASEDIR); tar czvf $(PKGRELEASE).tar.gz $(PKGRELEASE)
@echo "Release created: $(PKGDIR).tar.gz"
pkg-push: pkg-add
ops pkg push $(PKGRELEASE)
pkg-load: pkg-add
ops pkg load -l $(PKGRELEASE) -p 80
To make it simpler here's a Makefile that should in theory compile/build out my package, add it to ops, and then push it:
When I run
make pkg-push
I get this output:Have I missed a step somehow? It is slightly unclear if I am doing something wrong with regards to the docs.
If I use
ops pkg load -l
it works as expected:Here's my repo, sorry I'm a bit new to this: https://github.com/radiosilence/nano-web
Also here's a GitHub Action failing: https://github.com/radiosilence/nano-web/actions/runs/8299691056/job/22715977688