Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support python3 (macOS 12.3+) (#2)
- Loading branch information
Showing
23 changed files
with
475 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-executables-have-shebangs | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-bugbear] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule alfred-workflow
deleted from
8110e8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
WORKFLOW_NAME=alfred-coin-ticker.alfredworkflow | ||
set -euo pipefail | ||
|
||
SCRIPT_HOME=$(dirname "$(realpath "$0")") | ||
VERSION=$(cat version) | ||
: "${BUILD_DIR:="$SCRIPT_HOME/build"}" | ||
: "${WORKFLOW_FILENAME:=alfred-coin-ticker.alfredworkflow}" | ||
|
||
echo "Home path: $SCRIPT_HOME" | ||
echo "Version: $VERSION" | ||
echo "Build dir: $BUILD_DIR" | ||
echo "Workflow: $WORKFLOW_FILENAME" | ||
|
||
#read -p "Continue? [y/N]" -n 1 -r | ||
#echo # new line | ||
#if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
# # pass | ||
# echo "Building..." | ||
#else | ||
# echo "abort" | ||
# exit 1 | ||
#fi | ||
|
||
cd "$SCRIPT_HOME/alfred-workflow/workflow" || exit | ||
git clean -nx | ||
rsync --archive --verbose \ | ||
--filter '- *.pyc' \ | ||
--filter '- *.egg-info' \ | ||
--filter '- *.dist-info' \ | ||
--filter '- __pycache__' \ | ||
"$BUILD_DIR/.site-packages/" "$BUILD_DIR/" | ||
|
||
read -p "Continue? [y/N]" -n 1 -r | ||
echo # new line | ||
if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
git clean -fx | ||
else | ||
echo "abort" | ||
exit 1 | ||
fi | ||
# shellcheck disable=SC2046 | ||
cp $(<include.list) "$BUILD_DIR/" | ||
cd "$BUILD_DIR" || exit | ||
rm -rf "./.site-packages" | ||
|
||
cd "$SCRIPT_HOME" || exit | ||
rm -f $WORKFLOW_NAME | ||
zip -r $WORKFLOW_NAME -@ <includes.list | ||
zip -r "$SCRIPT_HOME/$WORKFLOW_FILENAME" . -x@"$SCRIPT_HOME/exclude.list" |
Oops, something went wrong.