From d5cbadf94476b07039ba9a468591bd443ee617e7 Mon Sep 17 00:00:00 2001
From: Alex Kanitz <alexander.kanitz@alumni.ethz.ch>
Date: Sun, 10 Jul 2022 12:50:24 +0200
Subject: [PATCH] final

---
 .gitlab-ci.yml           | 9 ++++++---
 ascii_alignment_pileup.R | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4ecb1f5..98f9d5a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,14 +4,18 @@ default:
 
 test:
   rules:
-    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
+    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+      when: never
   script:
     - docker build -t testimage:latest .
     - docker run --rm -it testimage:latest tests/test.sh
 
 test_and_publish:
   rules:
-    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
+    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+      when: never
   script:
     - export VERSION=$(grep 'version <-' ascii_alignment_pileup.R | cut -f2 -d'"')
     - export IMAGE="${DOCKER_ORG}/${DOCKER_REPO}:${VERSION}"
@@ -23,4 +27,3 @@ test_and_publish:
     - docker run --rm -it $IMAGE tests/test.sh
     - echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USER}" --password-stdin
     - docker push $IMAGE
-
diff --git a/ascii_alignment_pileup.R b/ascii_alignment_pileup.R
index 69d60e7..daebf34 100755
--- a/ascii_alignment_pileup.R
+++ b/ascii_alignment_pileup.R
@@ -29,7 +29,7 @@ against one or more regions specified in a BED file.\n"
 author <- "Author: Alexander Kanitz"
 affiliation <- "Affiliation: Biozentrum, University of Basel"
 email <- "Email: alexander.kanitz@alumni.ethz.ch"
-version <- "1.0.3"
+version <- "1.1.0"
 version_formatted <- paste("Version:", version, sep=" ")
 requirements <- c("optparse", "rtracklayer", "GenomicAlignments", "tools")
 requirements_txt <- paste("Requires:", paste(requirements, collapse=", "), sep=" ")
-- 
GitLab