Skip to content

Commit

Permalink
Merge branch 'release/v0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Nov 3, 2020
2 parents a9249a9 + 7030fe1 commit adf8f74
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to thoth will be documented in this file.
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).

## [[0.2.2]](https://github.com/thoth-pub/thoth/releases/tag/v0.2.2) - 2020-11-03
### Changed
- Set `THOTH_API` on build via docker

## [[0.2.1]](https://github.com/thoth-pub/thoth/releases/tag/v0.2.1) - 2020-11-02
### Changed
- Redirect to relevant routes upon save and create actions in APP
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth"
version = "0.2.1"
version = "0.2.2"
authors = ["Javier Arias <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -16,8 +16,8 @@ maintenance = { status = "actively-developed" }
members = ["thoth-api", "thoth-app", "thoth-client"]

[dependencies]
thoth-api = {version = "0.2.1", path = "thoth-api", features = ["backend"] }
thoth-client = {version = "0.2.1", path = "thoth-client" }
thoth-api = {version = "0.2.2", path = "thoth-api", features = ["backend"] }
thoth-client = {version = "0.2.2", path = "thoth-client" }
actix-http = "1.0.1"
actix-rt = "1.0.0"
actix-web = "3.0.0"
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ARG BASE_IMAGE=ekidd/rust-musl-builder:1.44.1
ARG THOTH_API

FROM ${BASE_IMAGE} as build

ARG THOTH_API
ENV THOTH_API=${THOTH_API}

# Install build dependencies
RUN sudo apt-get update && sudo apt-get -y install pkg-config npm
RUN sudo npm install -g [email protected]
Expand All @@ -17,7 +19,7 @@ COPY --chown=rust:rust ./src ./src
COPY --chown=rust:rust ./thoth-api ./thoth-api
COPY --chown=rust:rust ./thoth-client ./thoth-client
COPY --chown=rust:rust ./thoth-app ./thoth-app
ENV THOTH_API ${THOTH_API}

RUN wasm-pack build thoth-app/ \
--target web \
--release
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</p>

<p>
<a href="https://travis-ci.com/openbookpublishers/thoth"><img alt="Travis Info" src="https://travis-ci.com/openbookpublishers/thoth.svg?branch=master"/></a>
<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>
<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>
<a href="https://crates.io/crates/thoth"><img alt="Crate Info" src="https://img.shields.io/crates/v/thoth.svg?maxAge=86400"/></a>
<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>
Expand Down Expand Up @@ -69,6 +69,14 @@ wasm-pack build thoth-app/ --target web \
&& cargo run start app
```

### Building with docker

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:

```
docker build --build-arg THOTH_API=https://api.thoth.openbookpublishers.com . -t openbookpublishers/thoth
```

## Acknowledgements

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/).
2 changes: 1 addition & 1 deletion thoth-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-api"
version = "0.2.1"
version = "0.2.2"
authors = ["Javier Arias <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions thoth-app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-app"
version = "0.2.1"
version = "0.2.2"
authors = ["Javier Arias <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down Expand Up @@ -30,4 +30,4 @@ wasm-logger = "0.2.0"
stdweb = "0.4.20"
serde = { version = "1.0.115", features = ["derive"] }
url = "2.1.1"
thoth-api = { version = "0.2.1", path = "../thoth-api" }
thoth-api = { version = "0.2.2", path = "../thoth-api" }
3 changes: 2 additions & 1 deletion thoth-app/src/component/navbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::route::AdminRoute;
use crate::route::AppRoute;
use crate::service::cookie::CookieService;
use crate::SESSION_COOKIE;
use crate::THOTH_API;

pub struct NavbarComponent {}

Expand Down Expand Up @@ -73,7 +74,7 @@ impl Component for NavbarComponent {
{ "Timeline" }
</a>
<hr class="navbar-divider" />
<a class="navbar-item" href="/graphiql" title="GraphiQL">
<a class="navbar-item" href={format!("{}/graphiql", THOTH_API)} title="GraphiQL">
{ "GraphiQL" }
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions thoth-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-client"
version = "0.2.1"
version = "0.2.2"
authors = ["Javier Arias <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -9,7 +9,7 @@ repository = "https://github.com/thoth-pub/thoth"
readme = "README.md"

[dependencies]
thoth-api = {version = "0.2.1", path = "../thoth-api" }
thoth-api = {version = "0.2.2", path = "../thoth-api" }
graphql_client = "0.9.0"
chrono = { version = "0.4", features = ["serde"] }
reqwest = { version = "0.10", features = ["json"] }
Expand Down

0 comments on commit adf8f74

Please sign in to comment.