Coder Social home page Coder Social logo

Comments (3)

eyberg avatar eyberg commented on June 6, 2024

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"
}

from ops.

eyberg avatar eyberg commented on June 6, 2024

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

from ops.

radiosilence avatar radiosilence commented on June 6, 2024

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

from ops.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.