forked from memsql/singlestore-spark-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (62 loc) · 1.82 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
69
70
71
72
73
74
75
76
77
SHELL := /bin/bash
##############################
# BUILD
#
VERSION := $(shell sbt 'export version' | tail -n 1)
export VERSION
default: build
.PHONY: git-commit-template
git-commit-template: .commit_template
@git config commit.template .commit_template
.PHONY: version
version:
@echo $(VERSION)
.PHONY: clean
clean:
sbt clean \
"project connectorLib" clean \
"project etlLib" clean \
"project interface" clean \
"project tests" clean
rm -rf distribution/
.PHONY: style
style:
sbt "project etlLib" scalastyle \
"project connectorLib" scalastyle \
"project interface" scalastyle
.PHONY: build
build: clean
sbt assembly
.PHONY: build-test
build-test: clean
sbt "project tests" assembly
.PHONY: build-sample
build-sample:
cd dockertest/sample_pipelines; sbt assembly
.PHONY: docs
docs: clean
sbt unidoc
.PHONY: package
package: docs build
mkdir -p distribution/dist/memsql-$(VERSION)
cp README.md distribution/dist/memsql-$(VERSION)/
cp target/scala-2.10/MemSQL-assembly-$(VERSION).jar distribution/dist/memsql-$(VERSION)/
cp -r target/scala-2.10/unidoc/ distribution/dist/memsql-$(VERSION)/docs/
cd distribution/dist; \
tar cvzf memsql-$(VERSION).tar.gz memsql-$(VERSION)/
.PHONY: psytest
psytest: build-test build-sample
psy dockertest dockertest/.psyduck
.PHONY: publish
publish:
sbt "project connectorLib" publishSigned \
"project etlLib" publishSigned \
"project interface" assembly
aws s3api put-object --bucket download.memsql.com --key memsql-spark-interface-$(VERSION)/memsql-spark-interface-$(VERSION).jar --body interface/target/scala-2.10/MemSQL\ Spark\ Interface-assembly-$(VERSION).jar --acl public-read
.PHONY: publish-docs
publish-docs:
sbt unidoc makeSite ghpagesPushSite
.PHONY: release
release: publish publish-docs
sbt "project connectorLib" sonatypeRelease \
"project etlLib" sonatypeRelease