-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
32 lines (26 loc) · 1014 Bytes
/
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
UUID := $(shell id -u)
GUID := $(shell id -g)
CRYSTAL_VERSION := 1.9
build:
shards build coveralls --progress --error-trace
test:
crystal spec --order random --error-on-warnings
lint:
bin/ameba
release_linux:
docker build . --build-arg CRYSTAL_VERSION=$(CRYSTAL_VERSION) --tag coverage-reporter:1.0
docker run --rm -t -v $(shell pwd):/app \
-w /app --user $(UUID):$(GUID) \
coverage-reporter:1.0 \
shards build coveralls --production --release --static --no-debug --progress
cd bin && strip coveralls && tar -cvzf ../dist/coveralls-linux.tar.gz coveralls && cp coveralls ../dist/
release: release_linux
.ONESHELL:
new_version:
@read -p "New version: " version
@read -p "Brief description: " description
sed -i "s/version:.*/version: $$version/" shard.yml
sed -i "s/VERSION = ".*"/VERSION = \"$$version\"/" src/coverage_reporter.cr
git add shard.yml src/coverage_reporter.cr
git commit --message "$$version: $$description"
git tag --annotate --message "$$version: $$description" v$$version