diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2022-05-20 12:06:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-20 12:06:31 -0400 |
| commit | 8ab4abf190778867a8eccde08733c45f3760b2d0 (patch) | |
| tree | f5b63f5e192c36d8c6bf47e4c30c68d8b1a73728 /bin | |
| parent | 1316e8132e58361f42cb4315c586e0e2cccfc64c (diff) | |
| parent | 47123198760f8740acda0799d3b22f14b3f69550 (diff) | |
Merge pull request #1548 from inkstitch/feature_guided_fill
Feature guided fill
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/build-distribution-archives | 3 | ||||
| -rwxr-xr-x | bin/git-pre-commit-hook | 17 | ||||
| -rwxr-xr-x | bin/style-check | 8 |
3 files changed, 27 insertions, 1 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index a4129e83..c7973022 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -118,10 +118,11 @@ if [ "$BUILD" = "linux" ]; then %_signature gpg EOF + deb_version="$(sed -E 's/[^a-zA-Z0-9.+]/./g' <<< "$VERSION")" fpm -s dir \ -t deb \ -n inkstitch \ - -v "$VERSION" \ + -v "$deb_version" \ -d "inkscape >= 1.0.0" \ --license "GPL-3.0" \ --description "An open-source machine embroidery design platform based on Inkscape" \ diff --git a/bin/git-pre-commit-hook b/bin/git-pre-commit-hook new file mode 100755 index 00000000..81ace2cd --- /dev/null +++ b/bin/git-pre-commit-hook @@ -0,0 +1,17 @@ +#!/bin/bash + +# copy (DO NOT SYMLINK) this file to .git/hooks/pre-commit +# to check style on all modified files before allowing the commit to complete +# +# DO NOT SYMLINK +# DO NOT SYMLINK +# DO NOT SYMLINK (why? security risk) + +cd $(dirname "$0")/../.. + +errors=$(git diff --cached | bin/style-check --diff 2>&1) + +if [ "$?" != "0" ]; then + echo "$errors" + exit 1 +fi diff --git a/bin/style-check b/bin/style-check new file mode 100755 index 00000000..bafd6e74 --- /dev/null +++ b/bin/style-check @@ -0,0 +1,8 @@ +#!/bin/bash + +# Checks Python coding style based on our project's preferences. Checks the +# files passed on the command-line or everything if no files are passed. +# Instead of files, "--diff" may be passed to check only the lines changed +# by a diff piped to standard input. + +flake8 --count --max-complexity=10 --max-line-length=150 --statistics --exclude=pyembroidery,__init__.py,electron,build,src,dist "${@:-.}" |
