From d9b259ffa52b8a64b8e80e78382766932ca3ad58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3rebe=20-=20Romain=20GERARD?= Date: Sun, 22 Oct 2023 11:01:42 +0200 Subject: [PATCH] Add release command Former-commit-id: 4fa7b76c195215c29aec96b6f6e1f85cb1524cfb [formerly 8a0503cc2ef0cfd2a97dc675ca7581461d5a38f3] [formerly 32da7f1039d687bffbdf7ab2b38ab2b5338e8db8 [formerly f3810b492dac9c02f083c4b8a6d06fe7698eb5be]] Former-commit-id: a8eef2cee2d12d616f1a6e3f90c9b9670d4f8314 [formerly e5c68873900edc0a35f490fe0894c5491cebcf46] Former-commit-id: a02312693839cbd20648d488e69716a29d8b0083 Former-commit-id: 597d2715c471b2abbab36fc499f37d62c9d9c8b9 Former-commit-id: 1a78d4a44a3b353319e42d134bbe5ce3aa70dbfc Former-commit-id: 8e8d1c4cb30aeb2ddc5d7f8d5f7306dc6d298626 [formerly 36cf71ae71046f826b0a50d2c640e980b743ad41] Former-commit-id: 5c900c65a6d03c3a24c9addfe6d3bac69525a5e5 --- justfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 022d9be..c5156f5 100644 --- a/justfile +++ b/justfile @@ -3,6 +3,18 @@ set dotenv-load := false _default: @just --list -docker_release $TAG: - depot build --project v4z5w7md33 --platform linux/arm/v7,linux/arm64,linux/amd64 -t ghcr.io/erebe/wstunnel:$TAG -t ghcr.io/erebe/wstunnel:latest --push . +make_release $VERSION: + sed -ie 's/^version = .*/version = "'$VERSION'"/g' Cargo.toml + cargo fmt --all -- --check --color=always || (echo "Use cargo fmt to format your code"; exit 1) + cargo clippy --all --all-features -- -D warnings || (echo "Solve your clippy warnings to succeed"; exit 1) + git add Cargo.* + git commit -m 'Bump version v'$VERSION + git tag v$VERSION -m 'version v'$VERSION + git push + git push --tags + @just docker_release v$VERSION + +docker_release $TAG: + docker login -u erebe ghcr.io + ~/.depot/bin/depot build --project v4z5w7md33 --platform linux/arm/v7,linux/arm64,linux/amd64 -t ghcr.io/erebe/wstunnel:$TAG -t ghcr.io/erebe/wstunnel:latest --push .