Skip to content

Commit

Permalink
Release v0.6.4 - a quick fix for analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
FieryCod committed Dec 5, 2021
1 parent fc8a997 commit 38aa622
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog

## 0.6.4
- [holy-lambda] Remove debug UserAgent header

## 0.6.3
See [migration guide](https://fierycod.github.io/holy-lambda/#/migration-guide)

Expand Down
2 changes: 1 addition & 1 deletion docs/stable-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Libraries
| Artifact name | Version | Purpose |
|--------------------------------------------------|---------|----------------------------------------------------------------|
| io.github.FieryCod/holy-lambda | 0.6.3 | Core library / Custom runtime implementation |
| io.github.FieryCod/holy-lambda | 0.6.4 | Core library / Custom runtime implementation |
| io.github.FieryCod/holy-lambda-default-retriever | 0.5.0 | Built in library supporting regular responses* |
| io.github.FieryCod/holy-lambda-async-retriever | 0.5.0 | Additional support for `Channel<Map\|ByteArray\|nil>` response |

Expand Down
2 changes: 1 addition & 1 deletion modules/holy-lambda-template/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>holy-lambda</groupId>
<artifactId>lein-template</artifactId>
<packaging>jar</packaging>
<version>0.6.5</version>
<version>0.6.6</version>
<name>lein-template</name>
<description>Template for holy lambda micro framework</description>
<url>https://github.com/FieryCod/holy-lambda/tree/master/packages/holy-lambda-template</url>
Expand Down
2 changes: 1 addition & 1 deletion modules/holy-lambda-template/project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject holy-lambda/lein-template "0.6.5"
(defproject holy-lambda/lein-template "0.6.6"

:description "Template for holy lambda micro framework"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{:git/url "https://github.com/FieryCod/holy-lambda"
:deps/root "./modules/holy-lambda-babashka-tasks"
:sha "e6c47274a2bfc7576a9da0ccdbc079c1e83bee17"}
io.github.FieryCod/holy-lambda {:mvn/version "0.6.3"}}
io.github.FieryCod/holy-lambda {:mvn/version "0.6.4"}}

;; Minimal babashka version which should be used in conjuction with holy-lambda
:min-bb-version "0.3.7"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{:deps {org.clojure/clojure {:mvn/version "1.10.3"}
io.github.FieryCod/holy-lambda {:mvn/version "0.6.3"}
io.github.FieryCod/holy-lambda {:mvn/version "0.6.4"}
com.github.clj-easy/graal-build-time {:mvn/version "0.1.4"}}

:paths ["src" "resources"]
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>io.github.FieryCod</groupId>
<artifactId>holy-lambda</artifactId>
<packaging>jar</packaging>
<version>0.6.3</version>
<version>0.6.4</version>
<name>holy-lambda</name>
<description>Micro framework which turns your code into AWS Lambda functions</description>
<url>https://github.com/FieryCod/holy-lambda</url>
Expand All @@ -18,7 +18,7 @@
<url>https://github.com/FieryCod/holy-lambda</url>
<connection>scm:git:git://github.com/FieryCod/holy-lambda.git</connection>
<developerConnection>scm:git:ssh://[email protected]/FieryCod/holy-lambda.git</developerConnection>
<tag>4fa19030f4699d5b80d0714694f37abcbb28f19c</tag>
<tag>fc8a9978ccdd2d7882b1f419806d6bbb1f2f13a7</tag>
</scm>
<build>
<sourceDirectory>src</sourceDirectory>
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject io.github.FieryCod/holy-lambda "0.6.3"
(defproject io.github.FieryCod/holy-lambda "0.6.4"
:description "Micro framework which turns your code into AWS Lambda functions"

:url "https://github.com/FieryCod/holy-lambda"
Expand Down
2 changes: 1 addition & 1 deletion src/fierycod/holy_lambda/custom_runtime.clj
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
(System/setProperty "com.amazonaws.xray.traceHeader" trace-id))

(when-not handler
(send-runtime-error runtime iid (u/->ex "Handler " ^String handler-name " not found!" disable-analitics?))
(send-runtime-error runtime iid (u/->ex "Handler " ^String handler-name " not found!") disable-analitics?)
(System/exit 1))

(when-not iid
Expand Down
16 changes: 7 additions & 9 deletions src/fierycod/holy_lambda/util.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
[java.net URL HttpURLConnection]
[java.io InputStream InputStreamReader])))

(def HL_VERSION "0.6.4")
(def USER_AGENT_HEADER "User-Agent")
(def USER_AGENT_VALUE (str "holy-lambda/" #?(:bb (str "bb-" (System/getProperty "babashka.version"))
:clj (str "java-" (System/getProperty "java.vendor.version")))
"-"
HL_VERSION))

(defn- compress-strings
[args]
(into
Expand Down Expand Up @@ -154,13 +161,6 @@
:else
(x->json-bytes response))))

(def HL_VERSION "0.6.3")
(def USER_AGENT_HEADER "User-Agent")
(def USER_AGENT_VALUE (str "holy-lambda/" #?(:bb (str "bb-" (System/getProperty "babashka.version"))
:clj (str "java-" (System/getProperty "java.vendor.version")))
"-"
HL_VERSION))

#?(:clj
(defn http
[method url-s response disable-analytics?]
Expand All @@ -172,8 +172,6 @@
(.setRequestProperty "content-type" "application/json")
(.setRequestMethod method))]

(println USER_AGENT_HEADER USER_AGENT_VALUE)

(when-not disable-analytics?
(.setRequestProperty http-conn USER_AGENT_HEADER USER_AGENT_VALUE))

Expand Down

0 comments on commit 38aa622

Please sign in to comment.