From 7cf7f5acada3751b2f4f832ca1e04895965e6de2 Mon Sep 17 00:00:00 2001 From: David Apirian Date: Tue, 1 Nov 2022 22:16:33 -0700 Subject: [PATCH] --- .prepare_deploy | 4 ++-- .trunk/.gitignore | 7 +++++++ .trunk/config/.markdownlint.yaml | 10 ++++++++++ .trunk/config/.shellcheckrc | 2 ++ .trunk/config/svgo.config.js | 14 ++++++++++++++ .trunk/trunk.yaml | 23 +++++++++++++++++++++++ build/darwin.x86_64/build | 1 + build/linux.aarch64/build | 1 + build/linux.armv6hf/build | 1 + build/linux.x86_64/build | 1 + build/windows.x86_64/build | 1 + 11 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 .trunk/.gitignore create mode 100644 .trunk/config/.markdownlint.yaml create mode 100644 .trunk/config/.shellcheckrc create mode 100644 .trunk/config/svgo.config.js create mode 100644 .trunk/trunk.yaml diff --git a/.prepare_deploy b/.prepare_deploy index 9f39912..526a4ed 100755 --- a/.prepare_deploy +++ b/.prepare_deploy @@ -35,13 +35,13 @@ do for dir in windows.*/ do - ( cd "$dir" && zip "../shellcheck-$tag.zip" * ) + ( cd "$dir" && zip "../shellcheck-$tag.zip" ./* ) done for dir in {linux,darwin}.*/ do base="${dir%/}" - ( cd "$dir" && tar -cJf "../shellcheck-$tag.$base.tar.xz" --transform="s:^:shellcheck-$tag/:" * ) + ( cd "$dir" && tar -cJf "../shellcheck-$tag.$base.tar.xz" --transform="s:^:shellcheck-$tag/:" ./* ) done done diff --git a/.trunk/.gitignore b/.trunk/.gitignore new file mode 100644 index 0000000..cf2f254 --- /dev/null +++ b/.trunk/.gitignore @@ -0,0 +1,7 @@ +*out +*logs +*actions +*notifications +plugins +user_trunk.yaml +user.yaml diff --git a/.trunk/config/.markdownlint.yaml b/.trunk/config/.markdownlint.yaml new file mode 100644 index 0000000..fb94039 --- /dev/null +++ b/.trunk/config/.markdownlint.yaml @@ -0,0 +1,10 @@ +# Autoformatter friendly markdownlint config (all formatting rules disabled) +default: true +blank_lines: false +bullet: false +html: false +indentation: false +line_length: false +spaces: false +url: false +whitespace: false diff --git a/.trunk/config/.shellcheckrc b/.trunk/config/.shellcheckrc new file mode 100644 index 0000000..bf70a5d --- /dev/null +++ b/.trunk/config/.shellcheckrc @@ -0,0 +1,2 @@ +enable=all +source-path=SCRIPTDIR diff --git a/.trunk/config/svgo.config.js b/.trunk/config/svgo.config.js new file mode 100644 index 0000000..b257d13 --- /dev/null +++ b/.trunk/config/svgo.config.js @@ -0,0 +1,14 @@ +module.exports = { + plugins: [ + { + name: "preset-default", + params: { + overrides: { + removeViewBox: false, // https://github.com/svg/svgo/issues/1128 + sortAttrs: true, + removeOffCanvasPaths: true, + }, + }, + }, + ], +}; diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 0000000..880ad15 --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,23 @@ +version: 0.1 +cli: + version: 1.0.1 +plugins: + sources: + - id: trunk + ref: v0.0.5 + uri: https://github.com/trunk-io/plugins +lint: + enabled: + - markdownlint@0.32.2 + - hadolint@2.10.0 + - git-diff-check + - shfmt@3.5.0 + - svgo@3.0.0 + - shellcheck@0.8.0 + - actionlint@1.6.22 + - prettier@2.7.1 + - gitleaks@8.15.0 +runtimes: + enabled: + - go@1.18.3 + - node@16.14.2 diff --git a/build/darwin.x86_64/build b/build/darwin.x86_64/build index 53857e8..e39597f 100755 --- a/build/darwin.x86_64/build +++ b/build/darwin.x86_64/build @@ -5,6 +5,7 @@ set -xe chmod +x striptests && ./striptests mkdir "$TARGETNAME" cabal update + # shellcheck disable=SC2086 # Intended splitting of CABALOPTS ( IFS=';'; cabal build $CABALOPTS ) find . -name shellcheck -type f -exec mv {} "$TARGETNAME/" \; ls -l "$TARGETNAME" diff --git a/build/linux.aarch64/build b/build/linux.aarch64/build index f8001aa..3bb5c3b 100755 --- a/build/linux.aarch64/build +++ b/build/linux.aarch64/build @@ -5,6 +5,7 @@ set -xe chmod +x striptests && ./striptests mkdir "$TARGETNAME" cabal update + # shellcheck disable=SC2086 # Intended splitting of CABALOPTS ( IFS=';'; cabal build $CABALOPTS --enable-executable-static ) find . -name shellcheck -type f -exec mv {} "$TARGETNAME/" \; ls -l "$TARGETNAME" diff --git a/build/linux.armv6hf/build b/build/linux.armv6hf/build index daa94d9..439e783 100755 --- a/build/linux.armv6hf/build +++ b/build/linux.armv6hf/build @@ -6,6 +6,7 @@ cd /scratch chmod +x striptests && ./striptests mkdir "$TARGETNAME" # This script does not cabal update because compiling anything new is slow + # shellcheck disable=SC2086 # Intended splitting of CABALOPTS ( IFS=';'; cabal build $CABALOPTS --enable-executable-static ) find . -name shellcheck -type f -exec mv {} "$TARGETNAME/" \; ls -l "$TARGETNAME" diff --git a/build/linux.x86_64/build b/build/linux.x86_64/build index 099f127..22c6836 100755 --- a/build/linux.x86_64/build +++ b/build/linux.x86_64/build @@ -5,6 +5,7 @@ set -xe chmod +x striptests && ./striptests mkdir "$TARGETNAME" cabal update + # shellcheck disable=SC2086 # Intended splitting of CABALOPTS ( IFS=';'; cabal build $CABALOPTS --enable-executable-static ) find . -name shellcheck -type f -exec mv {} "$TARGETNAME/" \; ls -l "$TARGETNAME" diff --git a/build/windows.x86_64/build b/build/windows.x86_64/build index 7bf186e..9f7c6b1 100755 --- a/build/windows.x86_64/build +++ b/build/windows.x86_64/build @@ -9,6 +9,7 @@ set -xe chmod +x striptests && ./striptests mkdir "$TARGETNAME" cabal update + # shellcheck disable=SC2086 # Intended splitting of CABALOPTS ( IFS=';'; cabal build $CABALOPTS ) find dist*/ -name shellcheck.exe -type f -ls -exec mv {} "$TARGETNAME/" \; ls -l "$TARGETNAME"