beego / bee

Bee is a tool for helping develop with beego app framework.
Apache License 2.0
1.44k stars 920 forks source link

可以不强制更新bee版本吗? #806

Open dada0z opened 2 years ago

dada0z commented 2 years ago

公司内网无法访问github。 每次使用bee pack,都要经历30秒的超时。 这个过程有些痛苦。 请将main函数的第一句删除,我的版本理应由我决定。

dada0z commented 2 years ago

I can't access github in the company's internal network. I have to wait for 30-second timeout, every time bee packing. It's painful. Please delete the first sentence of the main function. I will upgrade bee version if I need.

wangle201210 commented 2 years ago

fork一下,然后自己注释main.go 的 utils.NoticeUpdateBee() ,然后go install,之后运行 bee 相关命令就不会去拉取了

wangle201210 commented 2 years ago

公司内网无法访问github。 每次使用bee pack,都要经历30秒的超时。 这个过程有些痛苦。 请将main函数的第一句删除,我的版本理应由我决定。

第一句的意思是去检测下有没有更新的版本,有的话会提示你有版本可以更新 并不会自动更新的哦~ 每24小时检测一次

dada0z commented 2 years ago

公司内网无法访问github。 每次使用bee pack,都要经历30秒的超时。 这个过程有些痛苦。 请将main函数的第一句删除,我的版本理应由我决定。

第一句的意思是去检测下有没有更新的版本,有的话会提示你有版本可以更新 并不会自动更新的哦~ 每24小时检测一次

如果这样的话,我建议另起一个协程做这件事,主流程继续进行。

wangle201210 commented 2 years ago

开协程处理不太好,一开始加这个功能时我考虑过这样操作 后来发现输出log的位置就不能定下来了,所以没有另起协程 可以考虑加个命令bee versionLock之类的命令锁住,不检测是否有更新的tag @flycash 这里需要加个控制版本检测的开关不,需要的话,我就加下~

flycash commented 2 years ago

这个其实不是升级 Bee,而是检测是否有新版本。我觉得我们可以直接删掉这个检测,而后再次提供一个命令来检测 Bee 是否有新的版本。比如说 bee list 或者叫别的。不过我也没考虑好该叫做什么。 这种做法可能和个人癖好有关。但是从我角度来说,每次都主动检查是一件很糟糕的事情。

flycash commented 2 years ago

@wangle201210 你可以考虑一下新的命令。

lengpucheng commented 1 year ago

i deem that it can add a new command such as "bee upgrade" or "bee version check",not is check version when i use it to pack or build my application,especially in not internet