Skip to content

Commit

Permalink
6.1.1 (#401)
Browse files Browse the repository at this point in the history
* tukui, 'patch' value may now be 'All'.
* http, bad/missing 'content-length' value now bypasses updating the joblib progress bar
* updates CHANGELOG
* prep for 6.1.1 release
  • Loading branch information
torkus committed May 7, 2023
1 parent 7ab2ac2 commit 8d12205
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. This change
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 6.1.1 - 2023-05-07

### Fixed

* bad or missing 'content-length' HTTP header fields are now handled without errors.
* the "All" patch level returned by Tukui is now supported when checking the updated details of an addon.

## 6.1.0 - 2023-03-19

### Added
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Arch Linux users can install `strongbox` from the [AUR](https://aur.archlinux.or

For other Linux users:

1. download: [./releases/strongbox](https://github.com/ogri-la/strongbox/releases/download/6.1.0/strongbox)
1. download: [./releases/strongbox](https://github.com/ogri-la/strongbox/releases/download/6.1.1/strongbox)
2. make executable: `chmod +x strongbox`
3. run: `./strongbox`

If you're on macOS or having a problem with the binary or just prefer Java `.jar` files (requires Java 11+):

1. download: [./releases/strongbox-6.1.0-standalone.jar](https://github.com/ogri-la/strongbox/releases/download/6.1.0/strongbox-6.1.0-standalone.jar)
2. run: `java -jar strongbox-6.1.0-standalone.jar`
1. download: [./releases/strongbox-6.1.1-standalone.jar](https://github.com/ogri-la/strongbox/releases/download/6.1.1/strongbox-6.1.1-standalone.jar)
2. run: `java -jar strongbox-6.1.1-standalone.jar`

## Usage

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>ogri-la</groupId>
<artifactId>strongbox</artifactId>
<packaging>jar</packaging>
<version>6.1.0</version>
<version>6.1.1</version>
<name>strongbox</name>
<description>World Of Warcraft Addon Manager</description>
<url>https://github.com/ogri-la/strongbox</url>
Expand All @@ -18,7 +18,7 @@
<url>https://github.com/ogri-la/strongbox</url>
<connection>scm:git:git://github.com/ogri-la/strongbox.git</connection>
<developerConnection>scm:git:ssh://[email protected]/ogri-la/strongbox.git</developerConnection>
<tag>ed0d06e07da058c8b97330a5d5b97a6e033ce9be</tag>
<tag>e074a679b01f592c2330058d008544707cf7f7ce</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 ogri-la/strongbox "6.1.0"
(defproject ogri-la/strongbox "6.1.1"
:description "World Of Warcraft Addon Manager"
:url "https://github.com/ogri-la/strongbox"
:license {:name "GNU Affero General Public License (AGPL)"
Expand Down
5 changes: 3 additions & 2 deletions src/strongbox/http.clj
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@

;; count bytes transferred so we can update the job progress (if one exists). taken from:
;; - https://github.com/dakrone/clj-http/blob/7aa6d02ad83dff9af6217f39e517cde2ded73a25/examples/progress_download.clj
(let [length (-> resp (get-in [:headers "content-length"] 0) utils/to-int)
(let [length (-> resp (get-in [:headers "content-length"]) utils/to-int (or -1))
buffer-size (* 1024 10)]
(with-open [^java.io.InputStream input (:body resp)
output (clojure.java.io/output-stream partial-output-file)]
Expand All @@ -207,7 +207,8 @@
(let [size (.read input buffer)]
(when (pos? size)
(.write output buffer 0 size)
(joblib/*tick* (joblib/progress length (.getByteCount counter)))
(when (> length 0)
(joblib/*tick* (joblib/progress length (.getByteCount counter))))
(recur))))))))

(when streaming-response?
Expand Down
7 changes: 5 additions & 2 deletions src/strongbox/tukui_api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@

ti (->> addon-list (filter #(= source-id-str (:id %))) first)

interface-version (when-let [patch (:patch ti)]
{:interface-version (utils/game-version-to-interface-version patch)})]
patch (:patch ti)
interface-version (cond
(nil? patch) {}
(= patch "All") {:interface-version (utils/game-version-to-interface-version (utils/game-track-to-latest-game-version game-track))}
:else {:interface-version (utils/game-version-to-interface-version patch)})]
(when ti
[(merge {:download-url (:url ti)
:version (:version ti)
Expand Down

0 comments on commit 8d12205

Please sign in to comment.