From 313f81f7ed9ce7cd9bf91453640efaf70e2f9c90 Mon Sep 17 00:00:00 2001 From: marcbull <31337222+marcbull@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:06:44 +0100 Subject: [PATCH] chore: replace setup.py by setup in justfile --- justfile | 19 +++++++++++++++++++ setup.py | 34 ---------------------------------- 2 files changed, 19 insertions(+), 34 deletions(-) create mode 100644 justfile delete mode 100755 setup.py diff --git a/justfile b/justfile new file mode 100644 index 0000000..29000ad --- /dev/null +++ b/justfile @@ -0,0 +1,19 @@ +#!/usr/bin/env -S just --justfile +# +# To run this script, you must have installed the Just command runner. Execute: +# $ cargo install --locked just + +# +# Setup the environment: +# + +setup: + git config pull.rebase true + git config branch.autoSetupRebase always + cargo install --locked typos-cli + cargo install --locked cocogitto + cog install-hook --overwrite commit-msg + @echo "Done" + +self-update: + cargo install --locked just diff --git a/setup.py b/setup.py deleted file mode 100755 index 62a4ee3..0000000 --- a/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python3 -"""Script to install tools and setup development environment""" - -import os -import subprocess - -def setup_git(): - """Setup git for development""" - subprocess.run(['git', 'config', 'pull.rebase', 'true'], check = True) - subprocess.run(['git', 'config', 'branch.autoSetupRebase', 'always'], check = True) - - -def install_cocogitto(): - """Install cocogitto for conventional commits and version bumping""" - print("Install cocogitto...") - subprocess.run(['cargo', 'install', 'cocogitto'], check = True) - - -def setup_cocogitto(): - """Setup cocogitto for development use""" - print("Setup cocogitto...") - subprocess.run(['cog', 'install-hook', '--overwrite', 'commit-msg'], check = True) - - -def setup(): - """Install and setup all tools""" - setup_git() - - install_cocogitto() - setup_cocogitto() - - -if __name__ == "__main__": - setup()