-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (57 loc) · 1.88 KB
/
Makefile
File metadata and controls
67 lines (57 loc) · 1.88 KB
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
.PHONY: install
install: install_dependencies test docs
.PHONY: install_dependencies
install_dependencies:
@echo [Installing dependencies]
composer install
.PHONY: test
test:
@echo [Executing tests]
vendor/bin/phpunit
.PHONY: docs
docs:
@echo [Creating docs]
php vendor/bin/phpdoc
.PHONY: clean
clean:
@echo [Cleaning workspace]
rm -rf intermediate
rm -rf dist/apidocs
rm -rf vendor
.PHONY: inc_version
inc_version:
@echo [Getting inc version]
node scripts/inc_version
# Packagist looks for new tags in the git repo to find newly published
# packages
.PHONY: publish
publish: pre-publish inc_version
@echo [Publishing package]
git add .
git commit -m "Increment version to $(shell cat VERSION)"
git tag $(shell cat VERSION)
git push -u origin master
git push -u origin master --tags
# Verify that all tests pass, we are on master, and it is a clean branch
.PHONY: pre-publish
pre-publish: test
@if [ $(shell git symbolic-ref --short -q HEAD) = "master" ]; then exit 0; else \
echo "Current git branch does not appear to be 'master'. Refusing to publish."; exit 1; \
fi
@if [ $(shell git status --short) = ""]; then exit 0; else \
echo "Current git branch appears to be dirty"; exit 1; \
fi
# An internal LightStep target for regenerating the thrift protocol files
.PHONY: thrift
thrift:
thrift -r -gen php -out thrift $(LIGHTSTEP_REPO_ROOT)/go/src/github.com/lightstep/common-go/crouton.thrift
# An internal LightStep target for regenerating the protobuf files
# In order to run this, it is assumed that you have the following projects cloned into the same
# directly as this project:
# https://github.com/lightstep/lightstep-tracer-common
# https://github.com/googleapis/googleapis
.PHONY: proto
proto:
protoc --proto_path "$(PWD)/../googleapis:$(PWD)/../lightstep-tracer-common/" \
--php_out="$(PWD)/lib/generated" \
collector.proto google/api/annotations.proto google/api/http.proto