From afba06504a890a85d596abc1f1762f4bb7cd6f9d Mon Sep 17 00:00:00 2001 From: "Jason S. Ninneman" Date: Sun, 4 Jun 2017 13:21:52 -0700 Subject: [PATCH] Update the pipeline to produce a tarball of the source upon every commit. Unfortunately, it's not possible to preserve previous tarballs from run to run. --- .gitlab-ci.yml | 30 +++++++++++++++--------------- Makefile | 6 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c179851..f098723 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,6 +60,18 @@ html: paths: - "*.html" +dist: + stage: build + before_script: + - apk update + - apk add make asciidoc + script: + - export VERS=${CI_COMMIT_REF_NAME} + - make dist -e + artifacts: + paths: + - "*.tar.gz" + # run tests using the binary built before test:debug: stage: test @@ -94,9 +106,10 @@ test:release: pages: stage: deploy script: - - mkdir public + - mkdir -p public/releases - mv coverage public - "mv *.html public" + - "mv *.tar.gz public/releases" artifacts: paths: - public @@ -105,18 +118,5 @@ pages: dependencies: - html - test:debug + - dist -package: - stage: deploy - script: - - cp README.adoc README - artifacts: - paths: - - advent - - NEWS - - COPYING - - README - - advent.6 - dependencies: - - binary:release - - manpage diff --git a/Makefile b/Makefile index 2cc167f..4685fa4 100644 --- a/Makefile +++ b/Makefile @@ -67,9 +67,9 @@ DOCS=COPYING NEWS README.adoc TODO \ # Can't use GNU tar's --transform, needs to build under Alpine Linux advent-$(VERS).tar.gz: $(SOURCES) $(DOCS) @ls $(SOURCES) $(DOCS) | sed s:^:advent-$(VERS)/: >MANIFEST - @(cd ..; ln -s advent advent-$(VERS)) - (cd ..; tar -czvf advent/advent-$(VERS).tar.gz `cat advent/MANIFEST`) - @(cd ..; rm advent-$(VERS)) + @(ln -s . advent-$(VERS)) + (tar -T MANIFEST -czvf advent-$(VERS).tar.gz) + @(rm advent-$(VERS)) dist: advent-$(VERS).tar.gz -- 2.31.1