-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
34 lines (26 loc) · 1.3 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
VERSION = 1.1.0
GITBUCKET_VERSION = 4.32.0
SCALA_BIN_VERSION=2.13
.PHONY: help # List of targets with descriptions
help:
@grep '^\.PHONY: .* #' Makefile | sed 's/\.PHONY: \(.*\) # \(.*\)/\1\t\2/' | expand -t20
.PHONY: clean # Clean output files (target dir)
clean:
rm -rf target/ project/target/
.PHONY: build # Build the project and the plugin package
build:
sbt assembly
target/gitbucket-$(GITBUCKET_VERSION)-asciidoctor-plugin-$(VERSION).jar: build
cp target/scala-$(SCALA_BIN_VERSION)/gitbucket-asciidoctor-plugin-$(VERSION).jar target/gitbucket-$(GITBUCKET_VERSION)-asciidoctor-plugin-$(VERSION).jar
stamped-jar: target/gitbucket-$(GITBUCKET_VERSION)-asciidoctor-plugin-$(VERSION).jar
.PHONY: travis # Build on travis
travis: build
target/gitbucket-${GITBUCKET_VERSION}.war:
mkdir -p target
wget https://github.com/gitbucket/gitbucket/releases/download/$(GITBUCKET_VERSION)/gitbucket.war -O target/gitbucket-$(GITBUCKET_VERSION).war
.PHONY: localServer # Start a local gitbucket server with the plugin installed
localServer: stamped-jar target/gitbucket-$(GITBUCKET_VERSION).war
mkdir -p target/DATA/plugins
rm -rf target/DATA/plugins/*
cp target/gitbucket-$(GITBUCKET_VERSION)-asciidoctor-plugin-$(VERSION).jar target/DATA/plugins
java -jar target/gitbucket-$(GITBUCKET_VERSION).war --gitbucket.home=target/DATA