From 32c3bfe525987571203f0d5446d12af640ef00ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=A0?= Date: Sat, 27 Oct 2018 19:03:12 +0200 Subject: [PATCH 1/5] Add PHAR file to GitHub releases --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a77512aa..64ce2cc7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ install: travis_retry composer update --no-interaction $COMPOSER_FLAGS script: - vendor/bin/phpunit --verbose --coverage-clover=coverage.xml - - '[[ $TRAVIS_PHP_VERSION = 7.2* ]] && make build -j 4 || true' + - '[[ $TRAVIS_PHP_VERSION = 7.2* ]] && make build -j 4 && cp build/psysh/bin/psysh dist/psysh.phar || true' after_success: - bash <(curl -s https://codecov.io/bash) @@ -36,7 +36,9 @@ deploy: api_key: secure: LL8koDM1xDqzF9t0URHvmMPyWjojyd4PeZ7IW7XYgyvD6n1H6GYrVAeKCh5wfUKFbwHoa9s5AAn6pLzra00bODVkPTmUH+FSMWz9JKLw9ODAn8HvN7C+IooxmeClGHFZc0TfHfya8/D1E9C1iXtGGEoE/GqtaYq/z0C1DLpO0OU= file_glob: true - file: dist/psysh-*.tar.gz + file: + - dist/psysh-*.tar.gz + - dist/psysh.phar skip_cleanup: true on: tags: true From 4383aff2194e64a5f81726ecaf2f440c714ef254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=A0?= Date: Sat, 27 Oct 2018 19:17:09 +0200 Subject: [PATCH 2/5] Fix PHAR adding to GitHub releases --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 64ce2cc7f..82f532325 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,12 +24,12 @@ install: travis_retry composer update --no-interaction $COMPOSER_FLAGS script: - vendor/bin/phpunit --verbose --coverage-clover=coverage.xml - - '[[ $TRAVIS_PHP_VERSION = 7.2* ]] && make build -j 4 && cp build/psysh/bin/psysh dist/psysh.phar || true' + - '[[ $TRAVIS_PHP_VERSION = 7.2* ]] && make build -j 4 || true' after_success: - bash <(curl -s https://codecov.io/bash) -before_deploy: make dist -j 4 +before_deploy: make dist -j 4 && cp build/psysh/bin/psysh dist/psysh.phar deploy: provider: releases From 8a6df1f64fe74ec72c75478349cc684a7b70db2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=A0?= Date: Sat, 2 Feb 2019 18:53:26 +0100 Subject: [PATCH 3/5] Add support for signed PHARs --- .travis.yml | 3 ++- Makefile | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54ea43d00..6f01062ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ script: after_success: - bash <(curl -s https://codecov.io/bash) -before_deploy: make dist -j 4 && cp build/psysh/bin/psysh dist/psysh.phar +before_deploy: make dist -j 4 && cp build/psysh/psysh dist/psysh.phar && cp build/psysh/psysh.asc dist/psysh.asc deploy: provider: releases @@ -42,6 +42,7 @@ deploy: file: - dist/psysh-*.tar.gz - dist/psysh.phar + - dist/psysh.asc skip_cleanup: true on: tags: true diff --git a/Makefile b/Makefile index 3064b9409..798c0dfb0 100644 --- a/Makefile +++ b/Makefile @@ -95,13 +95,31 @@ build/psysh-php54-compat: $(PSYSH_SRC) $(PSYSH_SRC_FILES) build/%/psysh: vendor/bin/box build/% vendor/bin/box compile --working-dir $(dir $@) +# Signatures + +build/%/psysh.asc: build/%/psysh + echo $$DECRYPT_KEY | gpg --batch --yes --passphrase-fd 0 .github/keys.asc.gpg + gpg --batch --yes --import .github/keys.asc + + echo $$SIGN_KEY |\ + gpg --passphrase-fd 0 \ + -u $$KEY_ID \ + --armor \ + --detach-sig $(echo $@ | sed 's/.asc//') >\ + $@ + + gpg --fingerprint --with-colons $$KEY_ID |\ + grep "^fpr" |\ + sed -n 's/^fpr:::::::::\([[:alnum:]]\+\):/\1/p' |\ + xargs gpg --batch --delete-secret-keys + rm -rf .github/keys.asc # Dist packages -dist/psysh-$(VERSION).tar.gz: build/psysh/psysh +dist/psysh-$(VERSION).tar.gz: build/psysh/psysh build/psysh/psysh.asc @mkdir -p $(@D) tar -C $(dir $<) -czf $@ $(notdir $<) -dist/psysh-$(VERSION)-%.tar.gz: build/psysh-%/psysh +dist/psysh-$(VERSION)-%.tar.gz: build/psysh-%/psysh build/psysh-%/psysh.asc @mkdir -p $(@D) tar -C $(dir $<) -czf $@ $(notdir $<) From 3dcf614ee7c851a9bf4ab34bc9b4e25ceb117b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=A0?= Date: Sun, 1 Dec 2019 20:19:06 +0100 Subject: [PATCH 4/5] Move file copy to Makefile --- .travis.yml | 2 +- Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6f01062ef..7d95d9540 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ script: after_success: - bash <(curl -s https://codecov.io/bash) -before_deploy: make dist -j 4 && cp build/psysh/psysh dist/psysh.phar && cp build/psysh/psysh.asc dist/psysh.asc +before_deploy: make dist -j 4 deploy: provider: releases diff --git a/Makefile b/Makefile index 798c0dfb0..829df1bf3 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,8 @@ clean: ## Clean all created artifacts dist: ## Build tarballs for distribution dist: dist/psysh-$(VERSION).tar.gz dist/psysh-$(VERSION)-compat.tar.gz dist/psysh-$(VERSION)-php54.tar.gz dist/psysh-$(VERSION)-php54-compat.tar.gz + cp build/psysh/psysh dist/psysh.phar + cp build/psysh/psysh.asc dist/psysh.asc test: ## Run unit tests test: vendor/bin/phpunit From 181aef1f4090a435c9e25b09c6c9c328537ee8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=A0?= Date: Sun, 1 Dec 2019 20:54:53 +0100 Subject: [PATCH 5/5] Fix filename of ASC file --- .travis.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d95d9540..a4bd4f618 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ deploy: file: - dist/psysh-*.tar.gz - dist/psysh.phar - - dist/psysh.asc + - dist/psysh.phar.asc skip_cleanup: true on: tags: true diff --git a/Makefile b/Makefile index 829df1bf3..611aff85f 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ clean: ## Clean all created artifacts dist: ## Build tarballs for distribution dist: dist/psysh-$(VERSION).tar.gz dist/psysh-$(VERSION)-compat.tar.gz dist/psysh-$(VERSION)-php54.tar.gz dist/psysh-$(VERSION)-php54-compat.tar.gz cp build/psysh/psysh dist/psysh.phar - cp build/psysh/psysh.asc dist/psysh.asc + cp build/psysh/psysh.asc dist/psysh.phar.asc test: ## Run unit tests test: vendor/bin/phpunit