@@ -4,29 +4,38 @@ include Makefile.version
4
4
5
5
envout :
6
6
@echo " VERSION=$( VERSION) "
7
+ @echo " UNPACKED_VERSION=$( UNPACKED_VERSION) "
7
8
@echo " BUILDARG_VERSION=$( BUILDARG_VERSION) "
8
9
@echo " IMAGENAME=$( IMAGENAME) "
9
10
@echo " BUILDARG_PLATFORM=$( BUILDARG_PLATFORM) "
10
11
11
12
prepare :
12
13
sudo apt-get -qq -y install curl
13
14
14
- build :
15
+ build : download
15
16
docker buildx build $(BUILDARG_VERSION ) $(BUILDARG_PLATFORM ) -t $(IMAGENAME ) :latest .
16
17
docker buildx build $(BUILDARG_VERSION ) --load -t $(IMAGENAME ) :latest .
17
18
19
+ download : LanguageTool-$(VERSION ) .zip
20
+ -rm -rf LanguageTool-$(VERSION ) LanguageTool-$(UNPACKED_VERSION )
21
+ echo " :: unzipping LanguageTool-$( VERSION) .zip"
22
+ unzip -o LanguageTool-$(VERSION ) .zip 2>&1 1> /dev/null
23
+
24
+ LanguageTool-$(VERSION ) .zip :
25
+ curl -L https://www.languagetool.org/download/LanguageTool-$(VERSION ) .zip -o LanguageTool-$(VERSION ) .zip
26
+
18
27
test : test-cleanup.1
28
+ test : test-start
19
29
test : TESTIPADDRESS=$(subst ",,$(shell docker inspect languagetool | jq '.[0].NetworkSettings.IPAddress') )
20
30
test : test-print-ip-address
21
- test : test-start
22
31
test : test-run-test-lang
23
32
test : test-run-test-en
24
33
test : test-run-test-fr
25
34
test : test-cleanup.2
26
35
27
36
test-start :
28
37
docker run -d --name languagetool -p 8010:8010 $(IMAGENAME ) :latest
29
- sleep 3
38
+ sleep 6
30
39
31
40
test-print-ip-address :
32
41
@echo " IP address of languagetools docker container: $( TESTIPADDRESS) "
@@ -54,8 +63,8 @@ test-run-test-fr:
54
63
55
64
.PHONY : test-cleanup
56
65
test-cleanup.% :
57
- -docker stop languagetool
58
- -docker rm languagetool
66
+ -docker container stop languagetool
67
+ -docker container rm languagetool
59
68
60
69
.PHONY : tag
61
70
tag : tag-push
0 commit comments