Skip to content

Commit

Permalink
Update Sentry Java SDK to 6.33.0
Browse files Browse the repository at this point in the history
Replace deprecated Sean Corfield build library with official Clojure tools.build
Add Java 21 as a testing target on GitHub Actions
Preserve keyword namespaces in java-util-hashmappify. Thanks @DerGuteMoritz!
  • Loading branch information
dharrigan committed Nov 3, 2023
1 parent 33dda06 commit 3ca19e3
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '17']
java: ['8', '17', '21']
steps:
- uses: actions/checkout@v4

Expand All @@ -41,4 +41,4 @@ jobs:
cli: 'latest'

- name: Run Tests
run: clojure -T:build run-tests
run: bin/test
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@
foo.clj
.env
.clj-kondo/.cache
tags.lock
10 changes: 9 additions & 1 deletion CHANGELOG.md
Expand Up @@ -10,6 +10,13 @@ endeavour to be non-breaking (by moving to new names rather than by
breaking existing names). COMMITS is an ever-increasing counter of
commits since the beginning of this repository.

## [6.33.204]

- Update Sentry Java SDK to 6.33.0
- Replace deprecated Sean Corfield build library with official Clojure tools.build
- Add Java 21 as a testing target on GitHub Actions
- Preserve keyword namespaces in java-util-hashmappify. Thanks @DerGuteMoritz!

## [6.29.202]

- Update Sentry Java SDK to 6.29.0
Expand Down Expand Up @@ -371,7 +378,8 @@ commits since the beginning of this repository.
compatible with Sentry 10.0.1 and below. If you wish to use those
versions, please continue to use sentry-clj 1.7.30.

[Unreleased]: https://github.com/getsentry/sentry-clj/compare/6.29.202...HEAD
[Unreleased]: https://github.com/getsentry/sentry-clj/compare/6.33.204...HEAD
[6.33.204]: https://github.com/getsentry/sentry-clj/compare/6.29.202...6.33.204
[6.29.202]: https://github.com/getsentry/sentry-clj/compare/6.28.200...6.29.202
[6.28.200]: https://github.com/getsentry/sentry-clj/compare/6.26.199...6.28.200
[6.26.199]: https://github.com/getsentry/sentry-clj/compare/6.24.198...6.26.199
Expand Down
15 changes: 8 additions & 7 deletions deps.edn
Expand Up @@ -4,23 +4,24 @@
;;
;;
;;
io.sentry/sentry {:mvn/version "6.29.0"}
io.sentry/sentry {:mvn/version "6.33.0"}
ring/ring-core {:mvn/version "1.10.0"}}

:aliases {:build {:deps {io.github.seancorfield/build-clj {:git/tag "v0.9.2"
:git/sha "9c9f078"}}
:aliases {:build {:extra-deps {io.github.clojure/tools.build {:mvn/version "0.9.6"}
slipset/deps-deploy {:mvn/version "0.2.2"}}
:ns-default scripts.build}

:test {:extra-paths ["test"]
:extra-deps {cheshire/cheshire {:mvn/version "5.11.0"}
com.github.seancorfield/expectations {:mvn/version "2.0.165"}
lambdaisland/kaocha {:mvn/version "1.86.1355"}
:extra-deps {cheshire/cheshire {:mvn/version "5.12.0"}
com.github.seancorfield/expectations {:mvn/version "2.1.188"}
lambdaisland/kaocha {:mvn/version "1.87.1366"}
lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"}
orchestra/orchestra {:mvn/version "2021.01.01-1"}
org.clojure/test.check {:mvn/version "1.1.1"}}}

:antq {:replace-deps {com.github.liquidz/antq {:mvn/version "2.6.1121"}
:antq {:replace-deps {com.github.liquidz/antq {:mvn/version "2.7.1133"}
org.slf4j/slf4j-nop {:mvn/version "2.0.9"}}
:replace-paths ["."]
:exec-fn antq.tool/outdated
:exec-args {:skip ["pom"]
:verbose true
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/deps.edn
Expand Up @@ -5,7 +5,7 @@
;;
;;
ch.qos.logback/logback-classic {:mvn/version "1.4.11"}
io.sentry/sentry {:mvn/version "6.29.0"}
io.sentry/sentry {:mvn/version "6.33.0"}
io.sentry/sentry-clj {:local/root "../../../sentry-clj"}
org.clojure/tools.cli {:mvn/version "1.0.219"}
org.clojure/tools.logging {:mvn/version "1.2.4"}
Expand Down
2 changes: 1 addition & 1 deletion examples/ring_with_tracing/deps.edn
Expand Up @@ -7,7 +7,7 @@
ch.qos.logback/logback-classic {:mvn/version "1.4.11"}
integrant/integrant {:mvn/version "0.8.1"}
integrant/repl {:mvn/version "0.3.3"}
io.sentry/sentry {:mvn/version "6.29.0"}
io.sentry/sentry {:mvn/version "6.33.0"}
io.sentry/sentry-clj {:local/root "../../../sentry-clj"}
org.clojure/tools.cli {:mvn/version "1.0.219"}
org.clojure/tools.logging {:mvn/version "1.2.4"}
Expand Down
2 changes: 1 addition & 1 deletion examples/uncaught/deps.edn
Expand Up @@ -5,7 +5,7 @@
;;
;;
ch.qos.logback/logback-classic {:mvn/version "1.4.11"}
io.sentry/sentry {:mvn/version "6.29.0"}
io.sentry/sentry {:mvn/version "6.33.0"}
io.sentry/sentry-clj {:local/root "../../../sentry-clj"}
org.clojure/tools.cli {:mvn/version "1.0.219"}
org.clojure/tools.logging {:mvn/version "1.2.4"}
Expand Down
39 changes: 0 additions & 39 deletions pom.xml

This file was deleted.

101 changes: 58 additions & 43 deletions scripts/build.clj
@@ -1,55 +1,70 @@
(ns scripts.build
(:require
[clojure.tools.build.api :as b]
[org.corfield.build :as bb]))
[deps-deploy.deps-deploy :as dd]))

(def ^:private version (format "6.29.%s" (b/git-count-revs nil)))
(def ^:private library 'io.sentry/sentry-clj)

(defn run-tests
"Tests the application.
(defn ^:private the-version
[patch]
(format "6.33.%s" patch))

This task will compile and test the application.
"
[opts]
(-> (merge {:main-args ["-m" "kaocha.runner"]} opts)
(bb/run-tests)))
(defn ^:private pom-template
[tag]
[[:description "A very thin wrapper around the official Java library for Sentry."]
[:url "https://github.com/getsentry/sentry-clj"]
[:licenses
[:license
[:name "Eclipse Public License"]
[:url "http://www.eclipse.org/legal/epl-v10.html"]]]
[:scm
[:url "https://github.com/getsentry/sentry-clj"]
[:connection "scm:git:git://github.com/getsentry/sentry-clj.git"]
[:developerConnection "scm:git:ssh://git@github.com/getsentry/sentry-clj.git"]
[:tag tag]]])

(defn jar
"JAR the artifact.
This task will create the JAR in the `target` directory.
"
[{:keys [tag] :or {tag version} :as opts}]
(-> opts
(assoc :lib library :version tag :tag tag)
(bb/clean)
(bb/jar)))

(defn deploy
"Deploy the JAR to your local repository (proxy).
This task will build and deploy the JAR to your
local repository using `deps-deploy`. This requires
the following environment variables being set beforehand:
(def ^:private revs (Integer/parseInt (b/git-count-revs nil)))
(def ^:private snapshot (the-version (format "%s-SNAPSHOT" (inc revs))))
(def ^:private class-dir "target/classes")
(def ^:private target "target")

CLOJARS_URL, CLOJARS_USERNAME, CLOJARS_PASSWORD
(defn ^:private jar-opts
[{:keys [version] :as opts}]
(assoc opts
:lib library
:version version
:jar-file (format "target/%s-%s.jar" library version)
:basis (b/create-basis)
:class-dir class-dir
:target target
:src-dirs ["src"]
:pom-data (pom-template version)))

Even although they are CLOJARS environment variables, they
can actually point to anywhere, like your own Nexus OSS repository
or an Artifactory repository for example.
You may want to consider something like `direnv` to manage your
per-directory loading of environment variables.
"
[{:keys [tag] :or {tag version} :as opts}]
(-> opts
(assoc :lib library :version tag :tag tag)
(bb/deploy)))
(defn jar
"This task will create the JAR in the `target` directory."
[{:keys [tag] :or {tag snapshot} :as opts}]
(let [{:keys [jar-file] :as opts'} (jar-opts (assoc opts :version tag))]
(println (format "Cleaning '%s'..." target))
(b/delete {:path "target"})
(println (format "Writing 'pom.xml'..."))
(b/write-pom opts')
(println (format "Copying source files to '%s'..." class-dir))
(b/copy-dir {:src-dirs ["src" "resources"] :target-dir class-dir})
(println (format "Building JAR to '%s'..." jar-file))
(b/jar opts')
(println "Finished."))
opts)

(defn install
"Deploy the JAR to your local .m2 directory"
[{:keys [tag] :or {tag version} :as opts}]
(-> opts
(assoc :lib library :version tag :tag tag)
(bb/install)))
[{:keys [tag] :or {tag snapshot} :as opts}]
(let [{:keys [jar-file] :as opts'} (jar-opts (assoc opts :version tag))]
(dd/deploy {:installer :local
:artifact (b/resolve-path jar-file)
:pom-file (b/pom-path (select-keys opts' [:lib :class-dir]))})))

(defn publish
[{:keys [tag] :or {tag snapshot} :as opts}]
(let [{:keys [jar-file] :as opts'} (jar-opts (assoc opts :version tag))]
(dd/deploy {:installer :remote
:artifact (b/resolve-path jar-file)
:pom-file (b/pom-path (select-keys opts' [:lib :class-dir]))})))

0 comments on commit 3ca19e3

Please sign in to comment.