forked from andersfugmann/amqp-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (43 loc) · 1.21 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
.PHONY: all build clean test install update-version update-spec doc commit-doc
all: build
build:
dune build @all
clean:
dune clean
test:
dune runtest
install:
dune build @install
dune install
uninstall:
dune uninstall
# Run tests.
tests/%.exe: tests/%.ml
dune build $@
integration:
dune build @integration
examples:
dune build @examples
update-version: VERSION=$(shell head -n 1 Changelog | sed 's/:.*//')
update-version:
@echo "Set version to: $(VERSION)"
@git tag --force $(VERSION)
@sed -i 's/version = ".*"/version = "$(VERSION)"/' async/src/connection.ml
update-spec:
@echo "Retrieving AMQP spec from RabbitMQ servers"
curl --fail https://www.rabbitmq.com/resources/specs/amqp0-9-1.extended.xml > spec/amqp0-9-1.extended.xml
doc:
dune build @doc
gh-pages: doc
git clone `git config --get remote.origin.url` .gh-pages --reference .
git -C .gh-pages checkout --orphan gh-pages
git -C .gh-pages reset
git -C .gh-pages clean -dxf
cp -r _build/default/_doc/_html/* .gh-pages
git -C .gh-pages add .
git -C .gh-pages config user.email 'docs@amqp-client'
git -C .gh-pages commit -m "Update documentation"
git -C .gh-pages push origin gh-pages -f
rm -rf .gh-pages
release: update-version
opam publish