From d4bead109ec4c693da0f47b9c0fddbc631a533cb Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Fri, 18 Feb 2022 16:18:10 +0100 Subject: test to build with specified arch (macOS) --- bin/build-python | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bin') diff --git a/bin/build-python b/bin/build-python index 195248c3..3cc3139b 100755 --- a/bin/build-python +++ b/bin/build-python @@ -38,7 +38,13 @@ pyinstaller_args+="--log-level DEBUG " # This adds bundle identifier in reverse DSN format for macos if [ "$BUILD" = "osx" ]; then pyinstaller_args+="--osx-bundle-identifier org.inkstitch.app " +<<<<<<< HEAD pyinstaller_args+="-i electron/build/icons/mac/inkstitch.icns" +======= + # in macOS we get an error when building libgfortran: incompatible with target arch x86_64 (has arch: arm64)! + # let's try if this fixes it + pyinstaller_args+="--target-arch x86_64 " +>>>>>>> bcf63fec (test to build with specified arch (macOS)) if [[ -z ${GITHUB_REF} ]]; then echo "Dev or Local Build" else -- cgit v1.2.3 From 7bd5dd6b50999ad46fb8d18b75724107f08f3d61 Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Fri, 18 Feb 2022 18:55:25 +0100 Subject: test with macos python 3.8.x --- bin/build-python | 6 ------ 1 file changed, 6 deletions(-) (limited to 'bin') diff --git a/bin/build-python b/bin/build-python index 3cc3139b..195248c3 100755 --- a/bin/build-python +++ b/bin/build-python @@ -38,13 +38,7 @@ pyinstaller_args+="--log-level DEBUG " # This adds bundle identifier in reverse DSN format for macos if [ "$BUILD" = "osx" ]; then pyinstaller_args+="--osx-bundle-identifier org.inkstitch.app " -<<<<<<< HEAD pyinstaller_args+="-i electron/build/icons/mac/inkstitch.icns" -======= - # in macOS we get an error when building libgfortran: incompatible with target arch x86_64 (has arch: arm64)! - # let's try if this fixes it - pyinstaller_args+="--target-arch x86_64 " ->>>>>>> bcf63fec (test to build with specified arch (macOS)) if [[ -z ${GITHUB_REF} ]]; then echo "Dev or Local Build" else -- cgit v1.2.3 From 29786dcd04bce589091ae01a82083fb827ab8125 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 4 Apr 2022 21:13:22 -0400 Subject: don't violate deb version string constraints --- bin/build-distribution-archives | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') 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" \ -- cgit v1.2.3 From f24b329ef5994d09b1ecba996c439150e3af8195 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 28 Apr 2022 22:37:34 -0400 Subject: pre-commit hook that only checks modifed files --- bin/git-pre-commit-hook | 22 ++++++++++++++++++++++ bin/style-check | 6 ++++++ 2 files changed, 28 insertions(+) create mode 100755 bin/git-pre-commit-hook create mode 100755 bin/style-check (limited to 'bin') diff --git a/bin/git-pre-commit-hook b/bin/git-pre-commit-hook new file mode 100755 index 00000000..2a65775a --- /dev/null +++ b/bin/git-pre-commit-hook @@ -0,0 +1,22 @@ +#!/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")/../.. + +IFS=$'\n' +files=( $(git diff-index --cached --name-only --diff-filter=AMCR HEAD) ) + +if [ "${#files}" -gt 0 ]; then + errors=$(bin/style-check "${files[@]}" 2>&1) + + if [ "$?" != "0" ]; then + echo "$errors" + exit 1 + fi +fi diff --git a/bin/style-check b/bin/style-check new file mode 100755 index 00000000..ead4d553 --- /dev/null +++ b/bin/style-check @@ -0,0 +1,6 @@ +#!/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. + +flake8 --count --max-complexity=10 --max-line-length=150 --statistics --exclude=pyembroidery,__init__.py,electron,build,src,dist "${@:-.}" -- cgit v1.2.3 From 1140be3cefcf070b03fd219c64a1f015db5ef510 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 28 Apr 2022 22:53:19 -0400 Subject: only check style on lines changed by commit --- bin/git-pre-commit-hook | 13 ++++--------- bin/style-check | 2 ++ 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/git-pre-commit-hook b/bin/git-pre-commit-hook index 2a65775a..81ace2cd 100755 --- a/bin/git-pre-commit-hook +++ b/bin/git-pre-commit-hook @@ -9,14 +9,9 @@ cd $(dirname "$0")/../.. -IFS=$'\n' -files=( $(git diff-index --cached --name-only --diff-filter=AMCR HEAD) ) +errors=$(git diff --cached | bin/style-check --diff 2>&1) -if [ "${#files}" -gt 0 ]; then - errors=$(bin/style-check "${files[@]}" 2>&1) - - if [ "$?" != "0" ]; then - echo "$errors" - exit 1 - fi +if [ "$?" != "0" ]; then + echo "$errors" + exit 1 fi diff --git a/bin/style-check b/bin/style-check index ead4d553..bafd6e74 100755 --- a/bin/style-check +++ b/bin/style-check @@ -2,5 +2,7 @@ # 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 "${@:-.}" -- cgit v1.2.3