Skip to content

Commit adf8f74

Browse files
committed
Merge branch 'release/v0.2.2'
2 parents a9249a9 + 7030fe1 commit adf8f74

File tree

9 files changed

+35
-20
lines changed

9 files changed

+35
-20
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to thoth will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [[0.2.2]](https://github.com/thoth-pub/thoth/releases/tag/v0.2.2) - 2020-11-03
8+
### Changed
9+
- Set `THOTH_API` on build via docker
10+
711
## [[0.2.1]](https://github.com/thoth-pub/thoth/releases/tag/v0.2.1) - 2020-11-02
812
### Changed
913
- Redirect to relevant routes upon save and create actions in APP

Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Javier Arias <javi@openbookpublishers.com>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -16,8 +16,8 @@ maintenance = { status = "actively-developed" }
1616
members = ["thoth-api", "thoth-app", "thoth-client"]
1717

1818
[dependencies]
19-
thoth-api = {version = "0.2.1", path = "thoth-api", features = ["backend"] }
20-
thoth-client = {version = "0.2.1", path = "thoth-client" }
19+
thoth-api = {version = "0.2.2", path = "thoth-api", features = ["backend"] }
20+
thoth-client = {version = "0.2.2", path = "thoth-client" }
2121
actix-http = "1.0.1"
2222
actix-rt = "1.0.0"
2323
actix-web = "3.0.0"

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
ARG BASE_IMAGE=ekidd/rust-musl-builder:1.44.1
2-
ARG THOTH_API
32

43
FROM ${BASE_IMAGE} as build
54

5+
ARG THOTH_API
6+
ENV THOTH_API=${THOTH_API}
7+
68
# Install build dependencies
79
RUN sudo apt-get update && sudo apt-get -y install pkg-config npm
810
RUN sudo npm install -g npm@6.14.8
@@ -17,7 +19,7 @@ COPY --chown=rust:rust ./src ./src
1719
COPY --chown=rust:rust ./thoth-api ./thoth-api
1820
COPY --chown=rust:rust ./thoth-client ./thoth-client
1921
COPY --chown=rust:rust ./thoth-app ./thoth-app
20-
ENV THOTH_API ${THOTH_API}
22+
2123
RUN wasm-pack build thoth-app/ \
2224
--target web \
2325
--release

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</p>
99

1010
<p>
11-
<a href="https://travis-ci.com/openbookpublishers/thoth"><img alt="Travis Info" src="https://travis-ci.com/openbookpublishers/thoth.svg?branch=master"/></a>
11+
<a href="https://travis-ci.com/thoth-pub/thoth"><img alt="Travis Info" src="https://travis-ci.com/thoth-pub/thoth.svg?branch=master"/></a>
1212
<a href="https://github.com/thoth-pub/thoth/releases"><img alt="Thoth Releases" src="https://img.shields.io/github/release/thoth-pub/thoth.svg?colorB=58839b&maxAge=86400"/></a>
1313
<a href="https://crates.io/crates/thoth"><img alt="Crate Info" src="https://img.shields.io/crates/v/thoth.svg?maxAge=86400"/></a>
1414
<a href="https://github.com/thoth-pub/thoth/blob/master/LICENSE"><img alt="License Info" src="https://img.shields.io/github/license/thoth-pub/thoth.svg?colorB=blue"/></a>
@@ -69,6 +69,14 @@ wasm-pack build thoth-app/ --target web \
6969
&& cargo run start app
7070
```
7171

72+
### Building with docker
73+
74+
The wasm APP needs to know the endpoint the API will be running at compile time, we must provide `THOTH_API` as a build argument to the docker daemon upon build:
75+
76+
```
77+
docker build --build-arg THOTH_API=https://api.thoth.openbookpublishers.com . -t openbookpublishers/thoth
78+
```
79+
7280
## Acknowledgements
7381

7482
Thoth is being developed as part of the [COPIM](https://www.copim.ac.uk) project, an international effort to build community-owned, open systems and infrastructures to enable Open Access book publishing to flourish. COPIM is funded by the [Research England Development Fund](https://re.ukri.org/funding/our-funds-overview/research-england-development-red-fund/) (REDFund) and [Arcadia](https://www.arcadiafund.org.uk/).

thoth-api/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-api"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Javier Arias <javi@openbookpublishers.com>"]
55
edition = "2018"
66
license = "Apache-2.0"

thoth-app/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-app"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Javier Arias <javi@openbookpublishers.com>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -30,4 +30,4 @@ wasm-logger = "0.2.0"
3030
stdweb = "0.4.20"
3131
serde = { version = "1.0.115", features = ["derive"] }
3232
url = "2.1.1"
33-
thoth-api = { version = "0.2.1", path = "../thoth-api" }
33+
thoth-api = { version = "0.2.2", path = "../thoth-api" }

thoth-app/src/component/navbar.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::route::AdminRoute;
77
use crate::route::AppRoute;
88
use crate::service::cookie::CookieService;
99
use crate::SESSION_COOKIE;
10+
use crate::THOTH_API;
1011

1112
pub struct NavbarComponent {}
1213

@@ -73,7 +74,7 @@ impl Component for NavbarComponent {
7374
{ "Timeline" }
7475
</a>
7576
<hr class="navbar-divider" />
76-
<a class="navbar-item" href="/graphiql" title="GraphiQL">
77+
<a class="navbar-item" href={format!("{}/graphiql", THOTH_API)} title="GraphiQL">
7778
{ "GraphiQL" }
7879
</a>
7980
</div>

thoth-client/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-client"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Javier Arias <javi@openbookpublishers.com>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -9,7 +9,7 @@ repository = "https://github.com/thoth-pub/thoth"
99
readme = "README.md"
1010

1111
[dependencies]
12-
thoth-api = {version = "0.2.1", path = "../thoth-api" }
12+
thoth-api = {version = "0.2.2", path = "../thoth-api" }
1313
graphql_client = "0.9.0"
1414
chrono = { version = "0.4", features = ["serde"] }
1515
reqwest = { version = "0.10", features = ["json"] }

0 commit comments

Comments
 (0)