Skip to content

Commit 3e25a36

Browse files
committed
Download and package official war instead of build it
1 parent 9361d22 commit 3e25a36

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

debian/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Priority: optional
44
Maintainer: GBIF Development Team <[email protected]>
55
Uploaders: GBIF Development Team <[email protected]>
66
Build-Depends:
7-
debhelper (>= 11), maven, git, openjdk-8-jdk
7+
debhelper (>= 11), maven, git, curl
88
Standards-Version: 4.2.1
99
Homepage: https://github.com/gbif/ipt
1010
Vcs-Browser: https://github.com/gbif/ipt

debian/rules

+4-15
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,23 @@
1111

1212
# $(CURDIR) is the repository directory
1313

14-
M2_REPO = $(CURDIR)/debian/maven-repo-local
1514
CURVERSION = $(shell grep -oPm2 "(?<=<version>)[^<]+" "pom.xml" | tail -1)
16-
BUILDDATE = $(shell date -u +%Y%m%d%H%M%S)
17-
# Previously:
18-
# CURVERSION = $(shell mvn -Dmaven.repo.local=$(M2_REPO) -q -Dexec.executable=echo -Dexec.args='$${project.version}' --non-recursive exec:exec)-r$(shell git rev-parse HEAD | cut -c1-7)
19-
# but we don't have the git revision in a debian build from sources without .git directory
2015

2116
%:
2217
dh $@
2318

2419
override_dh_auto_build:
25-
ifeq ($(filter nobuildjar,$(DEB_BUILD_PROFILES)),)
26-
# This allows to skip the maven jar build (for instance, if its builded by another jenkins job)
27-
# for instance with debuild -us -uc -b --build-profiles=nobuildjar
28-
mvn -Dmaven.repo.local=$(M2_REPO) -P release install -DskipTests -Dmaven.buildNumber.revisionOnScmFailure=$(BUILDDATE)
29-
endif
30-
31-
32-
override_dh_auto_install:
33-
# install don't allow to rename files (like wars), so we copy here the file we want to install with the package
34-
cp $(CURDIR)/target/ipt-$(CURVERSION)-*.war $(CURDIR)/target/ipt.war
20+
dh_auto_build
21+
mkdir -p $(CURDIR)/target
22+
curl -o $(CURDIR)/target/ipt.war https://repository.gbif.org/content/groups/gbif/org/gbif/ipt/$(CURVERSION)/ipt-$(CURVERSION).war
3523

3624
override_dh_fixperms:
3725
dh_fixperms
3826
# If we need to set some special perms to a file
3927
# chmod 4755 debian/foo/opt/ipt/foo.jar
4028
# Also we use postinstall for this
4129

30+
4231
#override_dh_install:
4332
# dh_install # calls default *.install and *.dirs installation
4433
# man install

0 commit comments

Comments
 (0)