mirror of
https://github.com/mautrix/whatsapp.git
synced 2025-03-14 14:15:38 +00:00
v2: add stub
This commit is contained in:
parent
5cb4815857
commit
330823f9b7
8 changed files with 40 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
include:
|
||||
- project: 'mautrix/ci'
|
||||
file: '/go.yml'
|
||||
- project: 'mautrix/ci'
|
||||
file: '/gov2.yml'
|
||||
|
||||
variables:
|
||||
BINARY_NAME_V2: mautrix-whatsapp
|
||||
|
|
15
Dockerfile.v2.ci
Normal file
15
Dockerfile.v2.ci
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM alpine:3.20
|
||||
|
||||
ENV UID=1337 \
|
||||
GID=1337
|
||||
|
||||
RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq-go
|
||||
|
||||
ARG EXECUTABLE=./mautrix-whatsapp
|
||||
COPY $EXECUTABLE /usr/bin/mautrix-whatsapp
|
||||
COPY ./docker-run.sh /docker-run.sh
|
||||
ENV BRIDGEV2=1
|
||||
VOLUME /data
|
||||
WORKDIR /data
|
||||
|
||||
CMD ["/docker-run.sh"]
|
4
build-v2.sh
Executable file
4
build-v2.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
MAUTRIX_VERSION=$(cat go.mod | grep 'maunium.net/go/mautrix ' | awk '{ print $2 }')
|
||||
GO_LDFLAGS="-s -w -X main.Tag=$(git describe --exact-match --tags 2>/dev/null) -X main.Commit=$(git rev-parse HEAD) -X 'main.BuildTime=`date -Iseconds`' -X 'maunium.net/go/mautrix.GoModVersion=$MAUTRIX_VERSION'"
|
||||
go build -ldflags="$GO_LDFLAGS" ./cmd/mautrix-whatsapp "$@"
|
4
cmd/mautrix-whatsapp/main.go
Normal file
4
cmd/mautrix-whatsapp/main.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
package main
|
||||
|
||||
func main() {
|
||||
}
|
|
@ -15,7 +15,11 @@ function fixperms {
|
|||
}
|
||||
|
||||
if [[ ! -f /data/config.yaml ]]; then
|
||||
cp /opt/mautrix-whatsapp/example-config.yaml /data/config.yaml
|
||||
if [[ "$BRIDGEV2" == "1" ]]; then
|
||||
/usr/bin/mautrix-whatsapp -c /data/config.yaml -e
|
||||
else
|
||||
cp /opt/mautrix-whatsapp/example-config.yaml /data/config.yaml
|
||||
fi
|
||||
echo "Didn't find a config file."
|
||||
echo "Copied default config file to /data/config.yaml"
|
||||
echo "Modify that config file to your liking."
|
||||
|
|
4
go.mod
4
go.mod
|
@ -11,7 +11,7 @@ require (
|
|||
github.com/rs/zerolog v1.33.0
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||
github.com/tidwall/gjson v1.17.1
|
||||
go.mau.fi/util v0.6.0
|
||||
go.mau.fi/util v0.6.1-0.20240719175439-20a6073e1dd4
|
||||
go.mau.fi/webp v0.1.0
|
||||
go.mau.fi/whatsmeow v0.0.0-20240828153534-8acde1ba8592
|
||||
golang.org/x/exp v0.0.0-20240707233637-46b078467d37
|
||||
|
@ -19,7 +19,7 @@ require (
|
|||
golang.org/x/net v0.27.0
|
||||
golang.org/x/sync v0.7.0
|
||||
google.golang.org/protobuf v1.34.2
|
||||
maunium.net/go/mautrix v0.19.0
|
||||
maunium.net/go/mautrix v0.19.1-0.20240720173515-24ead553b23b
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
8
go.sum
8
go.sum
|
@ -67,8 +67,8 @@ github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg=
|
|||
github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
||||
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/util v0.6.1-0.20240719175439-20a6073e1dd4 h1:CYKYs5jwJ0bFJqh6pRoWtC9NIJ0lz0/6i2SC4qEBFaU=
|
||||
go.mau.fi/util v0.6.1-0.20240719175439-20a6073e1dd4/go.mod h1:ljYdq3sPfpICc3zMU+/mHV/sa4z0nKxc67hSBwnrk8U=
|
||||
go.mau.fi/webp v0.1.0 h1:BHObH/DcFntT9KYun5pDr0Ot4eUZO8k2C7eP7vF4ueA=
|
||||
go.mau.fi/webp v0.1.0/go.mod h1:e42Z+VMFrUMS9cpEwGRIor+lQWO8oUAyPyMtcL+NMt8=
|
||||
go.mau.fi/whatsmeow v0.0.0-20240828153534-8acde1ba8592 h1:wVBSwcGNGaI8agrExAXSb6rx9lfp9GvUtsAdl0wFWEY=
|
||||
|
@ -103,5 +103,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
|||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M=
|
||||
maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA=
|
||||
maunium.net/go/mautrix v0.19.0 h1:67eSJWam93mw44Q0/1SiOG7zQzXMUknUv5UaWkrODDU=
|
||||
maunium.net/go/mautrix v0.19.0/go.mod h1:UE+mSQ4sDUuJMbjN0aB9EjQSGgXd48AzMvZ6+QJV1k8=
|
||||
maunium.net/go/mautrix v0.19.1-0.20240720173515-24ead553b23b h1:Di+oGGsfDOdyCdKxFMVentY49lLIGyyWl2k6Kpx/S6w=
|
||||
maunium.net/go/mautrix v0.19.1-0.20240720173515-24ead553b23b/go.mod h1:xP3DCXdPBUe1sPiugLbd5mRh/mJQWfGWyED1S8s9V7c=
|
||||
|
|
1
pkg/connector/connector.go
Normal file
1
pkg/connector/connector.go
Normal file
|
@ -0,0 +1 @@
|
|||
package connector
|
Loading…
Add table
Reference in a new issue