-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from veewee/reproducability
Make reproducable composer.lock available in main repo instead of here
- Loading branch information
Showing
4 changed files
with
4 additions
and
7,110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,12 @@ help: | |
|
||
compile: | ||
$(if $(TAG),,$(error TAG is not defined. Pass via "make compile TAG=4.2.1")) | ||
$(if $(PHP),,$(error PHP is not defined. Pass via "make compile PHP=7.4.19")) | ||
@echo Compiling $(TAG) | ||
$(eval BUILD_DIR := $(shell mktemp -d -t grumphp-shim-build)) | ||
@echo Cloning GrumPHP $(TAG) in directory $(BUILD_DIR) | ||
git clone [email protected]:phpro/grumphp.git $(BUILD_DIR) | ||
git --work-tree=$(BUILD_DIR) --git-dir='$(BUILD_DIR)/.git' checkout 'tags/v$(TAG)' | ||
make prepare BUILD_DIR=$(BUILD_DIR) PHP=$(PHP) | ||
make prepare BUILD_DIR=$(BUILD_DIR) | ||
make sanity BUILD_DIR=$(BUILD_DIR) | ||
make cleanup BUILD_DIR=$(BUILD_DIR) | ||
# Release tag | ||
|
@@ -27,29 +26,21 @@ release: | |
|
||
testlocal: | ||
$(if $(GRUMPHP_DIR),,$(error GRUMPHP_DIR is not defined. Pass via "make testlocal GRUMPHP_DIR=/path/to/grumphp")) | ||
$(if $(PHP),,$(error PHP is not defined. Pass via "make testlocal PHP=7.4")) | ||
$(eval BUILD_DIR := $(shell mktemp -d -t grumphp-shim-build)) | ||
@echo Copying GrumPHP to directory $(BUILD_DIR) | ||
cp -r $(GRUMPHP_DIR)/. $(BUILD_DIR) | ||
make prepare BUILD_DIR=$(BUILD_DIR) PHP=$(PHP) | ||
make prepare BUILD_DIR=$(BUILD_DIR) | ||
make cleanup BUILD_DIR=$(BUILD_DIR) | ||
|
||
systemupdate: | ||
composer self-update | ||
|
||
prepare: | ||
$(if $(PHP),,$(error PHP is not defined. Pass via "make prepare PHP=7.4.19")) | ||
$(if $(BUILD_DIR),,$(error BUILD_DIR is not defined. Pass via "make prepare BUILD_DIR=/tmp/prepared-grumphp-src")) | ||
make systemupdate | ||
cp build/* '$(BUILD_DIR)' | ||
cp src/Composer/FixBrokenStaticAutoloader.php '$(BUILD_DIR)/src/Composer' | ||
php $(BUILD_DIR)/fix-some-stuff-in-composer.php | ||
composer --working-dir='$(BUILD_DIR)' config platform.php '$(PHP)' | ||
composer install --working-dir='$(BUILD_DIR)' --no-scripts --no-plugins --no-dev --no-interaction --optimize-autoloader | ||
php -d error_reporting='(E_ALL & ~E_DEPRECATED)' ./vendor/bin/box compile --working-dir='$(BUILD_DIR)' -vvv | ||
# Copy composer plugin | ||
cp '$(BUILD_DIR)/src/Composer/GrumPHPPlugin.php' '$(ROOT_DIR)/src/Composer/GrumPHPPlugin.php' | ||
cp '$(BUILD_DIR)/composer.lock' '$(ROOT_DIR)/phar.composer.lock' | ||
# All good : lets finish up | ||
cp '$(BUILD_DIR)/grumphp.phar' '$(ROOT_DIR)' | ||
gpg --local-user [email protected] --armor --detach-sign grumphp.phar | ||
|
@@ -59,7 +50,7 @@ sanity: | |
$(if $(BUILD_DIR),,$(error BUILD_DIR is not defined. Pass via "make sanity BUILD_DIR=/tmp/prepared-grumphp-src")) | ||
mv '$(BUILD_DIR)/composer.json.backup' '$(BUILD_DIR)/composer.json' | ||
rm -rf '$(BUILD_DIR)/vendor' | ||
composer update --dev --working-dir='$(BUILD_DIR)' --no-interaction | ||
composer install --working-dir='$(BUILD_DIR)' --no-interaction | ||
cd $(BUILD_DIR) && ./grumphp.phar run --testsuite=git_pre_commit && cd $(ROOT_DIR) | ||
|
||
cleanup: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.