From 93de2e50a9f811d184aea54c46d50e76df100ece Mon Sep 17 00:00:00 2001 From: abdfnx Date: Sun, 18 Sep 2022 13:16:34 +0300 Subject: [PATCH] trying to fix `botway init` command --- botway.json | 36 ++++++++++++++++-------------------- cmd/app/init.go | 12 +++++++----- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/botway.json b/botway.json index 8eb8f2cc..44203e70 100644 --- a/botway.json +++ b/botway.json @@ -1,22 +1,18 @@ { - "version": "0.1.95", - "architecture": { - "32bit": { - "url": "https://github.com/abdfnx/botway/releases/download/v0.1.95/botway_windows_v0.1.95_386.zip", - "bin": [ - "bin/botway.exe" - ], - "hash": "d25820adbc7f8ac55a287ea82615cfe6019a7a5642be4203404295ce4202f69d" - }, - "64bit": { - "url": "https://github.com/abdfnx/botway/releases/download/v0.1.95/botway_windows_v0.1.95_amd64.zip", - "bin": [ - "bin/botway.exe" - ], - "hash": "386d276ad5c8f3f6ac87ba5f4ea09c3b3033967a61d5c735659fa35b308bcb07" - } + "version": "0.1.95", + "architecture": { + "32bit": { + "url": "https://github.com/abdfnx/botway/releases/download/v0.1.95/botway_windows_v0.1.95_386.zip", + "bin": ["bin/botway.exe"], + "hash": "d25820adbc7f8ac55a287ea82615cfe6019a7a5642be4203404295ce4202f69d" }, - "homepage": "https://botway.web.app", - "license": "MIT", - "description": "🤖 Generate, build, handle and deploy your own bot with your favorite language, for Discord, or Telegram, or Slack" -} \ No newline at end of file + "64bit": { + "url": "https://github.com/abdfnx/botway/releases/download/v0.1.95/botway_windows_v0.1.95_amd64.zip", + "bin": ["bin/botway.exe"], + "hash": "386d276ad5c8f3f6ac87ba5f4ea09c3b3033967a61d5c735659fa35b308bcb07" + } + }, + "homepage": "https://botway.web.app", + "license": "MIT", + "description": "🤖 Generate, build, handle and deploy your own bot with your favorite language, for Discord, or Telegram, or Slack" +} diff --git a/cmd/app/init.go b/cmd/app/init.go index 7e54300f..0a4ef0ce 100755 --- a/cmd/app/init.go +++ b/cmd/app/init.go @@ -19,11 +19,13 @@ func InitCMD() *cobra.Command { Aliases: []string{"."}, } - if botwaygo.GetBotInfo("bot.host") == "railway.app" { - cmd.RunE = Contextualize(handler.DockerInit, handler.Panic) - } else if botwaygo.GetBotInfo("bot.host") == "render.com" { - cmd.Run = func(cmd *cobra.Command, args []string) { - initx.DockerInit() + if opts.Docker { + if botwaygo.GetBotInfo("bot.host") == "railway.app" { + cmd.RunE = Contextualize(handler.DockerInit, handler.Panic) + } else if botwaygo.GetBotInfo("bot.host") == "render.com" { + cmd.Run = func(cmd *cobra.Command, args []string) { + initx.DockerInit() + } } } else { cmd.Run = func(cmd *cobra.Command, args []string) {