Update the pipeline to produce a tarball of the source upon every commit. 44/head
authorJason S. Ninneman <jsn@mbar.us>
Sun, 4 Jun 2017 20:21:52 +0000 (13:21 -0700)
committerJason S. Ninneman <jsn@mbar.us>
Mon, 5 Jun 2017 00:13:28 +0000 (17:13 -0700)
Unfortunately, it's not possible to preserve previous tarballs from run to run.

.gitlab-ci.yml
Makefile

index c179851865000ddc8cc5a83d63d84e458623dd1e..f0987236de46447c6748fea4a1fb08ab405cb414 100644 (file)
@@ -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
index 2cc167f1709af788c790108038a950a802961eb5..4685fa4c54ecdd46e0c35355271c1efe8629b798 100644 (file)
--- 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