mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 03:41:27 +00:00
Improvements for distribution (#417)
* Don't pack sources (github does it better), sign sources * Make CircleCI generate the same git archive as Github, return make dist * Revert make clean too * Upload signature to Github release * Read Github token from an env variable
This commit is contained in:
parent
9f7ae0e86a
commit
f0eba7d51b
|
@ -65,9 +65,7 @@ jobs:
|
||||||
rm -rf ./.git
|
rm -rf ./.git
|
||||||
rm -rf ./dist/*
|
rm -rf ./dist/*
|
||||||
# Pack source
|
# Pack source
|
||||||
cd ..
|
git archive -o ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz --format tar.gz --prefix=${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG#v}/ ${CIRCLE_TAG}
|
||||||
tar -czf ${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz ${CIRCLE_PROJECT_REPONAME}
|
|
||||||
cd ${CIRCLE_PROJECT_REPONAME}
|
|
||||||
# Use latest installed python3 from pyenv
|
# Use latest installed python3 from pyenv
|
||||||
export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)"
|
export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)"
|
||||||
pip install packagecore
|
pip install packagecore
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -92,9 +92,19 @@ dist:
|
||||||
gzip nnn-$(VERSION).tar
|
gzip nnn-$(VERSION).tar
|
||||||
$(RM) -r nnn-$(VERSION)
|
$(RM) -r nnn-$(VERSION)
|
||||||
|
|
||||||
|
sign:
|
||||||
|
git archive -o nnn-$(VERSION).tar.gz --format tar.gz --prefix=nnn-$(VERSION)/ v$(VERSION)
|
||||||
|
gpg --detach-sign --yes nnn-$(VERSION).tar.gz
|
||||||
|
rm -f nnn-$(VERSION).tar.gz
|
||||||
|
|
||||||
|
$(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' \
|
||||||
|
-H 'Authorization: token $(NNN_SIG_UPLOAD_TOKEN)' -H 'Content-Type: application/pgp-signature' \
|
||||||
|
--upload-file nnn-$(VERSION).tar.gz.sig
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f $(BIN) nnn-$(VERSION).tar.gz
|
$(RM) -f $(BIN) nnn-$(VERSION).tar.gz *.sig
|
||||||
|
|
||||||
skip: ;
|
skip: ;
|
||||||
|
|
||||||
.PHONY: all debug install uninstall strip dist clean
|
.PHONY: all debug install uninstall strip dist sign clean
|
||||||
|
|
Loading…
Reference in a new issue