mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 02:00:03 +01:00
contrib: setup: Install and setup pre-commit
This commit is contained in:
parent
3731b03553
commit
003c251fdc
1 changed files with 16 additions and 0 deletions
|
|
@ -1,6 +1,21 @@
|
|||
#!/usr/bin/env -S bash -e
|
||||
#set up local repository
|
||||
|
||||
install_pip()
|
||||
{
|
||||
package=$1
|
||||
args=$2
|
||||
|
||||
python3 -m pip install $package $args
|
||||
}
|
||||
|
||||
setup_precommit()
|
||||
{
|
||||
echo "Configuring pre-commit hooks"
|
||||
install_pip pre-commit
|
||||
pre-commit install
|
||||
}
|
||||
|
||||
setup_git()
|
||||
{
|
||||
echo "Configuring git environment"
|
||||
|
|
@ -8,3 +23,4 @@ setup_git()
|
|||
}
|
||||
|
||||
setup_git
|
||||
setup_precommit
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue