Repos / pytaku / 681237b719
commit 681237b7194592b7025ba812923ef2dc031fca47
Author: Bùi Thành Nhân <hi@imnhan.com>
Date:   Sat Aug 8 21:11:22 2020 +0700

    fix tag detection

diff --git a/.builds/ubuntu.yml b/.builds/ubuntu.yml
index c7b3b8e..fbfd28c 100644
--- a/.builds/ubuntu.yml
+++ b/.builds/ubuntu.yml
@@ -42,17 +42,10 @@ tasks:
 
   # Builds.sr.ht doesn't support tag or even branch detection yet:
   # > https://todo.sr.ht/~sircmpwn/builds.sr.ht/170
-  # Also the yaml gets mangled badly whenever I try to use a pipe
-  # operator, so I'm moving the whole tag detection thing into a
-  # bash script.
+  # So here I manually check if current commit has an annotated tag.
   - check-publish: |
-      if [[ "$GITHUB_EVENT" == "push" ]] && [[ "$GITHUB_REF" =~ ^refs/tags/ ]]
-      then
-          echo "This is a tag push. Proceeding to publish..."
-      else
-          echo "Not deploying."
-          complete-build  # stop build with a "success" status
-      fi
+      cd pytaku
+      git describe --exact-match HEAD || complete-build
 
   - publish: |
       cd pytaku
diff --git a/pyproject.toml b/pyproject.toml
index 93383b8..b0cb2c4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "pytaku"
-version = "0.2.7"
+version = "0.2.8"
 description = ""
 authors = ["Bùi Thành Nhân <hi@imnhan.com>"]
 license = "AGPL-3.0-only"