Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
cd $SSH_PATH && \
git fetch origin --tags && \
git checkout "refs/tags/$VERSION" && \
docker build -t factorion-bot:"$VERSION" . && \
docker build -t factorion-bot:"$VERSION" --build-arg VERSION="$VERSION" . && \
docker stop factorion-bot || true && \
sleep 3 && \
docker rm factorion-bot || true && \
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ COPY . .
RUN cd factorion-bot-reddit && cargo install --path .

FROM debian:bookworm-slim
ARG VERSION=latest

LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.title="factorion-bot"
LABEL org.opencontainers.image.description="A Reddit bot that calculates factorials"
LABEL org.opencontainers.image.url="https://github.com/tolik518/factorion-bot"
LABEL org.opencontainers.image.source="https://github.com/tolik518/factorion-bot"
LABEL org.opencontainers.image.licenses="MIT"

RUN apt-get update && apt install -y openssl ca-certificates curl
WORKDIR /usr/factorion
COPY --from=builder /usr/local/cargo/bin/factorion-bot-reddit /usr/bin/factorion-bot
2 changes: 1 addition & 1 deletion factorion-bot-discord/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "factorion-bot-discord"
version = "2.1.11"
version = "2.1.12"
edition = "2024"
description = "factorion-bot (for factorials and related) on Discord"
license = "MIT"
Expand Down
7 changes: 7 additions & 0 deletions factorion-bot-discord/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ fn init() {

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let args = std::env::args().collect::<Vec<_>>();
if args.len() > 1 && (args[1] == "--version" || args[1] == "-v") {
println!("factorion-bot-discord v{}", env!("CARGO_PKG_VERSION"));
return Ok(());
}

init();

let consts = Consts {
float_precision: std::env::var("FLOAT_PRECISION")
.map(|s| s.parse().unwrap())
Expand Down
2 changes: 1 addition & 1 deletion factorion-bot-reddit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "factorion-bot-reddit"
version = "5.2.11"
version = "5.2.12"
edition = "2024"
description = "factorion-bot (for factorials and related) on Reddit"
license = "MIT"
Expand Down
6 changes: 6 additions & 0 deletions factorion-bot-reddit/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ impl Default for SubredditMode {

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let args = std::env::args().collect::<Vec<_>>();
if args.len() > 1 && (args[1] == "--version" || args[1] == "-v") {
println!("factorion-bot-reddit v{}", env!("CARGO_PKG_VERSION"));
return Ok(());
}

init();

let consts = Consts {
Expand Down