Skip to content

Commit

Permalink
feat: update autobuild + enhance event system + automatise event thre…
Browse files Browse the repository at this point in the history
…ad + add option to disable qr code printing
  • Loading branch information
Labfox committed Aug 25, 2024
1 parent d7b3850 commit 7044dbd
Show file tree
Hide file tree
Showing 49 changed files with 109 additions and 186 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:

- name: Build
run: |
cd whatsfly/dependencies
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -v -buildmode=c-shared -ldflags=-s -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-linux-amd64.so ./whatsfly/dependencies/main.go
cp ./whatsfly/dependencies/whatsmeow/static/whatsmeow-linux-amd64.so ./whatsfly/dependencies/whatsmeow/static/by-version/whatsmeow-linux-amd64-$GITHUB_SHA.so
- name: Commit changes
run: |
Expand Down Expand Up @@ -77,10 +77,9 @@ jobs:
env:
CGO_ENABLED: 1
run: |
cd whatsfly/dependencies
GOOS=darwin GOARCH=amd64 go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-amd64.dylib ./whatsfly/dependencies/main.go
GOOS=darwin GOARCH=arm64 go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64.dylib ./whatsfly/dependencies/main.go
cp ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-amd64.dylib ./whatsfly/dependencies/whatsmeow/static/by-version/whatsmeow-darwin-amd64-$GITHUB_SHA.dylib
cp ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64.dylib ./whatsfly/dependencies/whatsmeow/static/by-version/whatsmeow-darwin-arm64-$GITHUB_SHA.dylib
- name: Commit changes
run: |
git config --global user.email "[email protected]"
Expand Down
3 changes: 2 additions & 1 deletion dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ pytest-asyncio
aiosqlite
setuptools
requests
mkdocs
mkdocs
qrcode
29 changes: 23 additions & 6 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ghp-import==2.1.0
# via mkdocs
identify==2.6.0
# via pre-commit
idna==3.7
idna==3.8
# via
# requests
# yarl
Expand All @@ -32,7 +32,7 @@ isort==5.13.2
# via -r dev-requirements.in
jinja2==3.1.4
# via mkdocs
markdown==3.6
markdown==3.7
# via mkdocs
markupsafe==2.1.5
# via
Expand All @@ -43,12 +43,14 @@ mergedeep==1.3.4
# mkdocs
# mkdocs-get-deps
mkdocs==1.6.0
# via -r dev-requirements.in
# via
# -r dev-requirements.in
# -r requirements.in
mkdocs-get-deps==0.2.0
# via mkdocs
multidict==6.0.5
# via yarl
mypy==1.11.1
mypy==1.11.2
# via -r dev-requirements.in
mypy-extensions==1.0.0
# via
Expand All @@ -74,6 +76,8 @@ pluggy==1.5.0
# via pytest
pre-commit==3.8.0
# via -r dev-requirements.in
pypng==0.20220715.0
# via qrcode
pytest==8.3.2
# via
# -r dev-requirements.in
Expand All @@ -94,18 +98,31 @@ pyyaml==6.0.2
# vcrpy
pyyaml-env-tag==0.1
# via mkdocs
qrcode==7.4.2
# via
# -r dev-requirements.in
# -r requirements.in
requests==2.32.3
# via -r dev-requirements.in
# via
# -r dev-requirements.in
# -r requirements.in
ruff==0.6.2
# via -r dev-requirements.in
setuptools==73.0.1
# via
# -r dev-requirements.in
# -r requirements.in
six==1.16.0
# via python-dateutil
types-pyyaml==6.0.12.20240808
# via -r dev-requirements.in
# via
# -r dev-requirements.in
# -r requirements.in
typing-extensions==4.12.2
# via
# aiosqlite
# mypy
# qrcode
urllib3==2.2.2
# via requests
vcrpy==6.0.1
Expand Down
40 changes: 0 additions & 40 deletions go.mod

This file was deleted.

95 changes: 0 additions & 95 deletions go.sum

This file was deleted.

3 changes: 2 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
types-PyYAML
setuptools
requests
mkdocs
mkdocs
qrcode
12 changes: 10 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ click==8.1.7
# via mkdocs
ghp-import==2.1.0
# via mkdocs
idna==3.7
idna==3.8
# via requests
jinja2==3.1.4
# via mkdocs
markdown==3.6
markdown==3.7
# via mkdocs
markupsafe==2.1.5
# via
Expand All @@ -32,6 +32,8 @@ pathspec==0.12.1
# via mkdocs
platformdirs==4.2.2
# via mkdocs-get-deps
pypng==0.20220715.0
# via qrcode
python-dateutil==2.9.0.post0
# via ghp-import
pyyaml==6.0.2
Expand All @@ -41,12 +43,18 @@ pyyaml==6.0.2
# pyyaml-env-tag
pyyaml-env-tag==0.1
# via mkdocs
qrcode==7.4.2
# via -r requirements.in
requests==2.32.3
# via -r requirements.in
setuptools==73.0.1
# via -r requirements.in
six==1.16.0
# via python-dateutil
types-pyyaml==6.0.12.20240808
# via -r requirements.in
typing-extensions==4.12.2
# via qrcode
urllib3==2.2.2
# via requests
watchdog==4.0.2
Expand Down
13 changes: 5 additions & 8 deletions whatsfly/dependencies/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
module hey.jude/hey

go 1.21
go 1.22

toolchain go1.22.0
toolchain go1.22.2

require (
github.com/enriquebris/goconcurrentqueue v0.7.0
github.com/mdp/qrterminal/v3 v3.2.0
go.mau.fi/whatsmeow v0.0.0-20240811142232-82a29759f1fc
go.mau.fi/whatsmeow v0.0.0-20240821142752-3d63c6fcc1a7
google.golang.org/protobuf v1.34.2
modernc.org/sqlite v1.32.0
)
Expand All @@ -25,16 +24,14 @@ require (
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rs/zerolog v1.33.0 // indirect
go.mau.fi/libsignal v0.1.1 // indirect
go.mau.fi/util v0.6.0 // indirect
go.mau.fi/util v0.7.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a // indirect
modernc.org/libc v1.59.3 // indirect
modernc.org/libc v1.59.9 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.8.0 // indirect
modernc.org/strutil v1.2.0 // indirect
modernc.org/token v1.1.0 // indirect
rsc.io/qr v0.2.0 // indirect
)
18 changes: 6 additions & 12 deletions whatsfly/dependencies/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mdp/qrterminal/v3 v3.2.0 h1:qteQMXO3oyTK4IHwj2mWsKYYRBOp1Pj2WRYFYYNTCdk=
github.com/mdp/qrterminal/v3 v3.2.0/go.mod h1:XGGuua4Lefrl7TLEsSONiD+UEjQXJZ4mPzF+gWYIJkk=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand All @@ -40,10 +38,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.mau.fi/libsignal v0.1.1 h1:m/0PGBh4QKP/I1MQ44ti4C0fMbLMuHb95cmDw01FIpI=
go.mau.fi/libsignal v0.1.1/go.mod h1:QLs89F/OA3ThdSL2Wz2p+o+fi8uuQUz0e1BRa6ExdBw=
go.mau.fi/util v0.6.0 h1:W6SyB3Bm/GjenQ5iq8Z8WWdN85Gy2xS6L0wmnR7SVjg=
go.mau.fi/util v0.6.0/go.mod h1:ljYdq3sPfpICc3zMU+/mHV/sa4z0nKxc67hSBwnrk8U=
go.mau.fi/whatsmeow v0.0.0-20240811142232-82a29759f1fc h1:LMKV0RwBZzTwUJ6BwXN3u0LVxNbhFbfuAfqT+nYKiIc=
go.mau.fi/whatsmeow v0.0.0-20240811142232-82a29759f1fc/go.mod h1:BhHKalSq0qNtSCuGIUIvoJyU5KbT4a7k8DQ5yw1Ssk4=
go.mau.fi/util v0.7.0 h1:l31z+ivrSQw+cv/9eFebEqtQW2zhxivGypn+JT0h/ws=
go.mau.fi/util v0.7.0/go.mod h1:bWYreIoTULL/UiRbZdfddPh7uWDFW5yX4YCv5FB0eE0=
go.mau.fi/whatsmeow v0.0.0-20240821142752-3d63c6fcc1a7 h1:Aa4uov0rM0SQQ7Fc/TZZpmQEGksie2SVTv/UuCJwViI=
go.mau.fi/whatsmeow v0.0.0-20240821142752-3d63c6fcc1a7/go.mod h1:BhHKalSq0qNtSCuGIUIvoJyU5KbT4a7k8DQ5yw1Ssk4=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
Expand All @@ -57,8 +55,6 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
Expand All @@ -75,8 +71,8 @@ modernc.org/gc/v2 v2.5.0 h1:bJ9ChznK1L1mUtAQtxi0wi5AtAs5jQuw4PrPHO5pb6M=
modernc.org/gc/v2 v2.5.0/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU=
modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a h1:CfbpOLEo2IwNzJdMvE8aiRbPMxoTpgAJeyePh0SmO8M=
modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4=
modernc.org/libc v1.59.3 h1:A4QAp1lRSn2/b4aU+wBtq+yeKgq/2BUevrj0p1ZNy2M=
modernc.org/libc v1.59.3/go.mod h1:EY/egGEU7Ju66eU6SBqCNYaFUDuc4npICkMWnU5EE3A=
modernc.org/libc v1.59.9 h1:k+nNDDakwipimgmJ1D9H466LhFeSkaPPycAs1OZiDmY=
modernc.org/libc v1.59.9/go.mod h1:EY/egGEU7Ju66eU6SBqCNYaFUDuc4npICkMWnU5EE3A=
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E=
Expand All @@ -91,5 +87,3 @@ modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY=
rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs=
Loading

0 comments on commit 7044dbd

Please sign in to comment.