diff --git a/.gitignore b/.gitignore index 123bc5c..69d28f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .idea/ target/ .tmp/ -gomuks +/gomuks start run *.exe diff --git a/build.sh b/build.sh index 21f3540..24f1666 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ #!/bin/bash go generate ./web export MAUTRIX_VERSION=$(cat go.mod | grep 'maunium.net/go/mautrix ' | head -n1 | awk '{ print $2 }') -go build -ldflags "-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'" "$@" || exit 2 +go build -ldflags "-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'" ./cmd/gomuks "$@" || exit 2 diff --git a/config.go b/cmd/gomuks/config.go similarity index 100% rename from config.go rename to cmd/gomuks/config.go diff --git a/gomuks.go b/cmd/gomuks/gomuks.go similarity index 100% rename from gomuks.go rename to cmd/gomuks/gomuks.go diff --git a/main.go b/cmd/gomuks/main.go similarity index 100% rename from main.go rename to cmd/gomuks/main.go diff --git a/media.go b/cmd/gomuks/media.go similarity index 90% rename from media.go rename to cmd/gomuks/media.go index f36989b..760a308 100644 --- a/media.go +++ b/cmd/gomuks/media.go @@ -1,3 +1,19 @@ +// gomuks - A Matrix client written in Go. +// Copyright (C) 2024 Tulir Asokan +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package main import ( diff --git a/server.go b/cmd/gomuks/server.go similarity index 100% rename from server.go rename to cmd/gomuks/server.go diff --git a/websocket.go b/cmd/gomuks/websocket.go similarity index 100% rename from websocket.go rename to cmd/gomuks/websocket.go