forked from aws/aws-sdk-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (54 loc) · 2.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
all: clean coverage docs
test:
vendor/bin/phpunit $(TEST)
coverage:
vendor/bin/phpunit --coverage-html=build/artifacts/coverage $(TEST)
integ:
vendor/bin/phpunit -c phpunit.functional.xml $(TEST)
view-coverage:
open build/artifacts/coverage/index.html
clean:
rm -rf build/artifacts
cd docs && make clean
docs:
cd docs && make html
view-docs:
open docs/_build/html/index.html
# Packages the phar and zip
package: burgomaster
time php build/packager.php
# Downloads a copy of Burgomaster
burgomaster:
mkdir -p build/artifacts
curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.2/src/Burgomaster.php > build/artifacts/Burgomaster.php
# Ensures that the TAG variable was passed to the make command
check_tag:
$(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
# Creates a release but does not push it. This task updates the changelog
# with the TAG environment variable, replaces the VERSION constant, ensures
# that the source is still valid after updating, commits the changelog and
# updated VERSION constant, creates an annotated git tag using chag, and
# prints out a diff of the last commit.
tag: check_tag
@echo Tagging $(TAG)
chag update $(TAG)
sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/Aws/Common/Aws.php
php -l src/Aws/Common/Aws.php
git commit -a -m '$(TAG) release'
chag tag
@echo "Release has been created. Push using 'make release'"
@echo "Changes made in the release commit"
git diff HEAD~1 HEAD
# Creates a release based on the master branch and latest tag. This task
# pushes the latest tag, pushes master, creates a phar and zip, and creates
# a Github release. Use "TAG=X.Y.Z make tag" to create a release, and use
# "make release" to push a release. This task requires that the
# OAUTH_TOKEN environment variable is available and the token has permission
# to push to the repository.
release: check_tag package
git push origin master
git push origin $(TAG)
php build/gh-release.php $(TAG)
# Tags the repo and publishes a release.
full_release: tag release
.PHONY: docs burgomaster