mirror of
https://github.com/stryan/mumble-discord-bridge.git
synced 2024-11-14 19:45:41 -05:00
chore: move cpu profile into main
This commit is contained in:
parent
3b6d3ba5bd
commit
74ff984906
3
Makefile
3
Makefile
@ -6,6 +6,9 @@ mumble-discord-bridge: $(GOFILES)
|
|||||||
dev: $(GOFILES)
|
dev: $(GOFILES)
|
||||||
goreleaser build --skip-validate --rm-dist && sudo ./dist/mumble-discord-bridge_linux_amd64/mumble-discord-bridge
|
goreleaser build --skip-validate --rm-dist && sudo ./dist/mumble-discord-bridge_linux_amd64/mumble-discord-bridge
|
||||||
|
|
||||||
|
dev-profile: $(GOFILES)
|
||||||
|
goreleaser build --skip-validate --rm-dist && sudo ./dist/mumble-discord-bridge_linux_amd64/mumble-discord-bridge -cpuprofile cpu.prof
|
||||||
|
|
||||||
docker-latest:
|
docker-latest:
|
||||||
docker build -t stieneee/mumble-discord-bridge:latest .
|
docker build -t stieneee/mumble-discord-bridge:latest .
|
||||||
docker push stieneee/mumble-discord-bridge:latest
|
docker push stieneee/mumble-discord-bridge:latest
|
||||||
|
5
main.go
5
main.go
@ -25,8 +25,6 @@ var (
|
|||||||
date string
|
date string
|
||||||
)
|
)
|
||||||
|
|
||||||
var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`")
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
log.Println("Mumble-Discord-Bridge")
|
log.Println("Mumble-Discord-Bridge")
|
||||||
log.Println("v" + version + " " + commit + " " + date)
|
log.Println("v" + version + " " + commit + " " + date)
|
||||||
@ -45,6 +43,9 @@ func main() {
|
|||||||
discordCommand := flag.String("discord-command", lookupEnvOrString("DISCORD_COMMAND", "mumble-discord"), "DISCORD_COMMAND,Discord command string, env alt DISCORD_COMMAND, optional, defaults to mumble-discord")
|
discordCommand := flag.String("discord-command", lookupEnvOrString("DISCORD_COMMAND", "mumble-discord"), "DISCORD_COMMAND,Discord command string, env alt DISCORD_COMMAND, optional, defaults to mumble-discord")
|
||||||
mode := flag.String("mode", lookupEnvOrString("MODE", "constant"), "MODE,determine which mode the bridge starts in")
|
mode := flag.String("mode", lookupEnvOrString("MODE", "constant"), "MODE,determine which mode the bridge starts in")
|
||||||
nice := flag.Bool("nice", lookupEnvOrBool("NICE", false), "NICE,whether the bridge should automatically try to 'nice' itself")
|
nice := flag.Bool("nice", lookupEnvOrBool("NICE", false), "NICE,whether the bridge should automatically try to 'nice' itself")
|
||||||
|
|
||||||
|
cpuprofile := flag.String("cpuprofile", "", "write cpu profile to `file`")
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
log.Printf("app.config %v\n", getConfig(flag.CommandLine))
|
log.Printf("app.config %v\n", getConfig(flag.CommandLine))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user