Compare commits

..

No commits in common. "main" and "v0.4.1" have entirely different histories.
main ... v0.4.1

6 changed files with 472 additions and 522 deletions

View file

@ -18,5 +18,4 @@ repos:
name: ui/menu lint+fmt name: ui/menu lint+fmt
language: system language: system
files: ^ui/menu/ files: ^ui/menu/
pass_filenames: false entry: sh -c "npm run --prefix ui/menu pc"
entry: npm run --prefix ui/menu pc

View file

@ -2,17 +2,6 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.4.2] - 2023-07-22
### Bug Fixes
- Container entrypoint
- Website version ordering
### Miscellaneous Tasks
- Fix npm pre-commit hook
## [0.4.1] - 2023-04-05 ## [0.4.1] - 2023-04-05
### Bug Fixes ### Bug Fixes

958
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package] [package]
name = "talon" name = "talon"
version = "0.4.2" version = "0.4.1"
edition = "2021" edition = "2021"
authors = ["ThetaDev <t.testboy@gmail.com>"] authors = ["ThetaDev <t.testboy@gmail.com>"]
license = "MIT" license = "MIT"

View file

@ -41,8 +41,7 @@ for arch in "${ARCHITECTURES[@]}"; do
# Finalize container # Finalize container
buildah umount "$container" buildah umount "$container"
# entrypoint syntax: see issue https://github.com/containers/buildah/issues/1768 buildah config --entrypoint "/talon" --cmd "run -d /data" --arch "$arch" --port 3000 --author "ThetaDev" "$container"
buildah config --entrypoint '["/talon"]' --cmd "run -d /data" --arch "$arch" --port 3000 --author "ThetaDev" "$container"
buildah commit "$container" "$IMAGE:$arch-$TAG" buildah commit "$container" "$IMAGE:$arch-$TAG"
buildah manifest add "$REGISTRY/$IMAGE:$TAG" "$IMAGE:$arch-$TAG" buildah manifest add "$REGISTRY/$IMAGE:$TAG" "$IMAGE:$arch-$TAG"

View file

@ -300,17 +300,18 @@ impl TalonApi {
subdomain: Path<String>, subdomain: Path<String>,
) -> Result<Response<Json<Vec<Version>>>> { ) -> Result<Response<Json<Vec<Version>>>> {
let website = talon.db.get_website(&subdomain)?; let website = talon.db.get_website(&subdomain)?;
let mut versions = talon talon
.db .db
.get_website_versions(&subdomain) .get_website_versions(&subdomain)
.map(|r| r.map(Version::from)) .map(|r| r.map(Version::from))
.collect::<Result<Vec<_>, _>>()?; .collect::<Result<Vec<_>, _>>()
versions.sort_by_key(|v| v.id); .map(|data| {
Response::new(Json(data)).header(
Ok(Response::new(Json(versions)).header(
header::LAST_MODIFIED, header::LAST_MODIFIED,
httpdate::fmt_http_date(website.updated_at.into()), httpdate::fmt_http_date(website.updated_at.into()),
)) )
})
.map_err(Error::from)
} }
/// Get version /// Get version