-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathTaskfile.yml
More file actions
66 lines (54 loc) · 2.18 KB
/
Copy pathTaskfile.yml
File metadata and controls
66 lines (54 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: "3"
# https://taskfile.dev
tasks:
default:
- poetry run python -m tg
release:
- |
CURRENT_VERSION=$(cat tg/__init__.py | grep version | cut -d '"' -f 2)
echo Current version $CURRENT_VERSION
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{print $1 "." $2+1 "." $3}')
echo New version $NEW_VERSION
sed -i '' "s|$CURRENT_VERSION|$NEW_VERSION|g" tg/__init__.py
poetry version $NEW_VERSION
git add -u tg/__init__.py pyproject.toml
git commit -m "Release v$NEW_VERSION"
git tag v$NEW_VERSION
poetry build
POETRY_PYPI_TOKEN_PYPI=$(pass show i/pypi-tg-token | head -n 1) poetry publish
git push origin master --tags
/opt/homebrew/bin/gh release create $NEW_VERSION --generate-notes
release-brew:
- |
CURRENT_VERSION=$(cat tg/__init__.py | grep version | cut -d '"' -f 2)
echo Current version $CURRENT_VERSION
URL="https://github.com/paul-nameless/tg/archive/refs/tags/v$CURRENT_VERSION.tar.gz"
echo $URL
wget $URL -O /tmp/tg.tar.gz
HASH=$(sha256sum /tmp/tg.tar.gz | cut -d ' ' -f 1)
rm /tmp/tg.tar.gz
cd /opt/homebrew/Library/Taps/paul-nameless/homebrew-repo
sed -i '' "6s|.*| url \"https://github.com/paul-nameless/tg/archive/refs/tags/v$CURRENT_VERSION.tar.gz\"|" tg.rb
sed -i '' "7s|.*| sha256 \"$HASH\"|" tg.rb
brew audit --new tg
brew uninstall tg || true
brew install tg
brew test tg
git add -u tg.rb
git commit -m "Release tg.rb v$CURRENT_VERSION"
git push origin master
build:
- python3 -m pip install --upgrade setuptools wheel
- python3 setup.py sdist bdist_wheel
- python3 -m pip install --upgrade twine
- python3 -m twine upload --repository testpypi dist/*
ch:
- poetry run ruff check --fix --extend-select I
- poetry run ruff format .
- >-
poetry run mypy tg --warn-redundant-casts --warn-unused-ignores
--no-warn-no-return --warn-unreachable --strict-equality
--ignore-missing-imports --warn-unused-configs
--disallow-untyped-calls --disallow-untyped-defs
--disallow-incomplete-defs --check-untyped-defs
--disallow-untyped-decorators