Skip to content

Commit

Permalink
Add an dist task to easyly get out them
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 8, 2023
1 parent 5895439 commit 89f7d43
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ jobs:
- id: version
run: echo "version=$(grep version gradle.properties|sed "s/version=\(.*\)/\1/g")" > $GITHUB_OUTPUT
- run: echo "${{ steps.version.outputs.version }}"
- run: make dist

- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN --mount=type=cache,target=/home/gradle/.gradle \
gradle --parallel --exclude-task=:core:test \
--exclude-task=:core:spotbugsMain --exclude-task=:core:checkstyleMain \
--exclude-task=:core:spotbugsTest --exclude-task=:core:checkstyleTest --exclude-task=:core:testCLI \
:core:build :core:explodedWar :publish:build :examples:build :docs:buildDocs
:core:build :core:explodedWar :publish:build :examples:build :docs:buildDocs :core:libSourcesJar :core:libJavadocJar

RUN mkdir -p core/build/resources/test/org/mapfish/print/ \
&& chmod -R go=u /home/gradle /tmp/mapfish-print/ . \
Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ export DOCKER_BUILDKIT = 1

.PHONY: build
build: build-builder
# Required and not necessarily exists
touch CI.asc

docker build $(GIT_HEAD_ARG) --target=runner --tag=camptocamp/mapfish_print core
docker build $(GIT_HEAD_ARG) --target=tester --tag=mapfish_print_tester core
docker build $(GIT_HEAD_ARG) --target=watcher --tag=mapfish_print_watcher core

.PHONY: build-builder
build-builder:
# Required and not necessarily exists
touch CI.asc

docker build $(GIT_HEAD_ARG) --target=builder --tag=mapfish_print_builder .

.PHONY: checks
Expand Down Expand Up @@ -73,5 +73,13 @@ acceptance-tests-down: .env
bash -c 'rm -rf /mnt/geoserver_datadir/*'
rmdir /tmp/geoserver-data

.PHONY: dist
dist: build-builder
mkdir --parent core/build
rm -rf core/build/libs core/build/distributions
docker run --rm --user=$(shell id -u):$(shell id -g) \
--volume=$(PWD)/core/build:/src/core/build2/:rw mapfish_print_builder \
cp -r /src/core/build/libs /src/core/build/distributions /src/core/build2/

.env:
echo "USER_ID=$(shell id -u):$(shell id -g)" > $@

0 comments on commit 89f7d43

Please sign in to comment.