aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--pom.xml4
-rwxr-xr-xrelease.sh24
-rw-r--r--src/com/github/ivarref/yoltq.clj5
-rw-r--r--src/com/github/ivarref/yoltq/migrate.clj3
5 files changed, 34 insertions, 8 deletions
diff --git a/README.md b/README.md
index 465a0cf..e5b2059 100644
--- a/README.md
+++ b/README.md
@@ -333,7 +333,11 @@ easier.
## Change log
-### 2022-03-28 v0.2.?? [diff](https://github.com/ivarref/yoltq/compare/v0.2.51...v0.2.??)
+### 2022-03-29 v0.2.55 [diff](https://github.com/ivarref/yoltq/compare/v0.2.54...v0.2.55)
+Added: `unhealthy?` function which returns `true` if there are queues in error,
+or `false` otherwise.
+
+### 2022-03-28 v0.2.54 [diff](https://github.com/ivarref/yoltq/compare/v0.2.51...v0.2.54)
Fixed: Schedules should now be using milliseconds and not nanoseconds.
### 2022-03-28 v0.2.51 [diff](https://github.com/ivarref/yoltq/compare/v0.2.48...v0.2.51)
diff --git a/pom.xml b/pom.xml
index 28e0ece..9f591b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
<packaging>jar</packaging>
<groupId>com.github.ivarref</groupId>
<artifactId>yoltq</artifactId>
- <version>0.2.54</version>
+ <version>0.2.55</version>
<name>yoltq</name>
<dependencies>
<dependency>
@@ -30,7 +30,7 @@
<scm>
<connection>scm:git:git://github.com/ivarref/yoltq.git</connection>
<developerConnection>scm:git:ssh://git@github.com/ivarref/yoltq.git</developerConnection>
- <tag>v0.2.54</tag>
+ <tag>v0.2.55</tag>
<url>https://github.com/ivarref/yoltq</url>
</scm>
</project> \ No newline at end of file
diff --git a/release.sh b/release.sh
index dec59a2..cf0f09f 100755
--- a/release.sh
+++ b/release.sh
@@ -2,17 +2,31 @@
set -ex
+git update-index --refresh
+git diff-index --quiet HEAD --
+
clojure -Spom
clojure -M:test
clojure -M:jar
clojure -X:release ivarref.pom-patch/clojars-repo-only!
-VERSION=$(clojure -X:release ivarref.pom-patch/set-patch-version! :patch :commit-count+1)
-git add pom.xml
+LAST_TAG="$(git rev-list --tags --no-walk --max-count=1)"
+COMMITS_SINCE_LAST_TAG="$(git rev-list "$LAST_TAG"..HEAD --count)"
+echo "Squashing $COMMITS_SINCE_LAST_TAG commits ..."
+git reset --soft HEAD~"$COMMITS_SINCE_LAST_TAG"
+MSG="$(git log --format=%B --reverse HEAD..HEAD@{1})"
+git commit -m"$MSG"
+
+VERSION="$(clojure -X:release ivarref.pom-patch/set-patch-version! :patch :commit-count)"
+echo "Releasing $VERSION"
+sed -i "s/HEAD/v$VERSION/g" ./README.md
+git add pom.xml README.md
git commit -m "Release $VERSION"
-git tag -a v$VERSION -m "Release v$VERSION"
-git push --follow-tags
+git reset --soft HEAD~2
+git commit -m"Release $VERSION\n$MSG"
-clojure -X:deploy
+git tag -a v"$VERSION" -m "Release v$VERSION\n$MSG"
+git push --follow-tags --force
+clojure -X:deploy
echo "Released $VERSION"
diff --git a/src/com/github/ivarref/yoltq.clj b/src/com/github/ivarref/yoltq.clj
index 7d5434e..bb7a43e 100644
--- a/src/com/github/ivarref/yoltq.clj
+++ b/src/com/github/ivarref/yoltq.clj
@@ -160,6 +160,11 @@
:healthy?
(deref)))
+(defn unhealthy?
+ "Returns `true` if there are queues in error, otherwise `false`."
+ []
+ (false? (healthy?)))
+
(defn queue-stats []
(let [{:keys [conn]} @*config*
db (d/db conn)]
diff --git a/src/com/github/ivarref/yoltq/migrate.clj b/src/com/github/ivarref/yoltq/migrate.clj
index 6313b73..c97f679 100644
--- a/src/com/github/ivarref/yoltq/migrate.clj
+++ b/src/com/github/ivarref/yoltq/migrate.clj
@@ -56,3 +56,6 @@
(defn migrate! [cfg]
(to->v2 cfg))
+
+(comment
+ (migrate! @com.github.ivarref.yoltq/*config*))