mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Compile static bin locally for release (#457)
This commit is contained in:
parent
6f48a711d4
commit
6b093f213f
12
Makefile
12
Makefile
|
@ -97,6 +97,10 @@ uninstall:
|
||||||
strip: $(BIN)
|
strip: $(BIN)
|
||||||
$(STRIP) $^
|
$(STRIP) $^
|
||||||
|
|
||||||
|
static:
|
||||||
|
make O_STATIC=1 strip
|
||||||
|
mv $(BIN) $(BIN)-static
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
mkdir -p nnn-$(VERSION)
|
mkdir -p nnn-$(VERSION)
|
||||||
$(CP) -r $(DISTFILES) nnn-$(VERSION)
|
$(CP) -r $(DISTFILES) nnn-$(VERSION)
|
||||||
|
@ -108,14 +112,18 @@ sign:
|
||||||
gpg --detach-sign --yes nnn-$(VERSION).tar.gz
|
gpg --detach-sign --yes nnn-$(VERSION).tar.gz
|
||||||
rm -f nnn-$(VERSION).tar.gz
|
rm -f nnn-$(VERSION).tar.gz
|
||||||
|
|
||||||
|
upload-local: sign static
|
||||||
$(eval ID=$(shell curl -s 'https://api.github.com/repos/jarun/nnn/releases/tags/v$(VERSION)' | jq .id))
|
$(eval ID=$(shell curl -s 'https://api.github.com/repos/jarun/nnn/releases/tags/v$(VERSION)' | jq .id))
|
||||||
curl -XPOST 'https://uploads.github.com/repos/jarun/nnn/releases/$(ID)/assets?name=nnn-$(VERSION).tar.gz.sig' \
|
curl -XPOST 'https://uploads.github.com/repos/jarun/nnn/releases/$(ID)/assets?name=nnn-$(VERSION).tar.gz.sig' \
|
||||||
-H 'Authorization: token $(NNN_SIG_UPLOAD_TOKEN)' -H 'Content-Type: application/pgp-signature' \
|
-H 'Authorization: token $(NNN_SIG_UPLOAD_TOKEN)' -H 'Content-Type: application/pgp-signature' \
|
||||||
--upload-file nnn-$(VERSION).tar.gz.sig
|
--upload-file nnn-$(VERSION).tar.gz.sig
|
||||||
|
curl -XPOST 'https://uploads.github.com/repos/jarun/nnn/releases/$(ID)/assets?name=nnn-$(VERSION)-static' \
|
||||||
|
-H 'Authorization: token $(NNN_SIG_UPLOAD_TOKEN)' -H 'Content-Type: application/x-sharedlib' \
|
||||||
|
--upload-file $(BIN)-static
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f $(BIN) nnn-$(VERSION).tar.gz *.sig
|
$(RM) -f $(BIN) $(BIN)-static nnn-$(VERSION).tar.gz *.sig
|
||||||
|
|
||||||
skip: ;
|
skip: ;
|
||||||
|
|
||||||
.PHONY: all install uninstall strip dist sign clean
|
.PHONY: all install uninstall strip static dist sign upload-local clean
|
||||||
|
|
|
@ -100,6 +100,10 @@ uninstall:
|
||||||
strip: $(BIN)
|
strip: $(BIN)
|
||||||
$(STRIP) $^
|
$(STRIP) $^
|
||||||
|
|
||||||
|
static:
|
||||||
|
make O_STATIC=1 strip
|
||||||
|
mv $(BIN) $(BIN)-static
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
mkdir -p nnn-$(VERSION)
|
mkdir -p nnn-$(VERSION)
|
||||||
$(CP) -r $(DISTFILES) nnn-$(VERSION)
|
$(CP) -r $(DISTFILES) nnn-$(VERSION)
|
||||||
|
@ -113,14 +117,18 @@ sign:
|
||||||
gpg --detach-sign --yes nnn-$(VERSION).tar.gz
|
gpg --detach-sign --yes nnn-$(VERSION).tar.gz
|
||||||
rm -f nnn-$(VERSION).tar.gz
|
rm -f nnn-$(VERSION).tar.gz
|
||||||
|
|
||||||
|
upload-local: sign static
|
||||||
$(eval ID=$(shell curl -s 'https://api.github.com/repos/jarun/nnn/releases/tags/v$(VERSION)' | jq .id))
|
$(eval ID=$(shell curl -s 'https://api.github.com/repos/jarun/nnn/releases/tags/v$(VERSION)' | jq .id))
|
||||||
curl -XPOST 'https://uploads.github.com/repos/jarun/nnn/releases/$(ID)/assets?name=nnn-$(VERSION).tar.gz.sig' \
|
curl -XPOST 'https://uploads.github.com/repos/jarun/nnn/releases/$(ID)/assets?name=nnn-$(VERSION).tar.gz.sig' \
|
||||||
-H 'Authorization: token $(NNN_SIG_UPLOAD_TOKEN)' -H 'Content-Type: application/pgp-signature' \
|
-H 'Authorization: token $(NNN_SIG_UPLOAD_TOKEN)' -H 'Content-Type: application/pgp-signature' \
|
||||||
--upload-file nnn-$(VERSION).tar.gz.sig
|
--upload-file nnn-$(VERSION).tar.gz.sig
|
||||||
|
curl -XPOST 'https://uploads.github.com/repos/jarun/nnn/releases/$(ID)/assets?name=nnn-$(VERSION)-static' \
|
||||||
|
-H 'Authorization: token $(NNN_SIG_UPLOAD_TOKEN)' -H 'Content-Type: application/x-sharedlib' \
|
||||||
|
--upload-file $(BIN)-static
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f $(BIN) $(OBJS) nnn-$(VERSION).tar.gz *.sig
|
$(RM) -f $(BIN) $(BIN)-static $(OBJS) nnn-$(VERSION).tar.gz *.sig
|
||||||
|
|
||||||
skip: ;
|
skip: ;
|
||||||
|
|
||||||
.PHONY: all install uninstall strip dist sign clean
|
.PHONY: all install uninstall strip static dist sign upload-local clean
|
||||||
|
|
Loading…
Reference in a new issue