-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add cache and clean features #337
Conversation
Codecov Report
@@ Coverage Diff @@
## master #337 +/- ##
==========================================
+ Coverage 33.51% 33.56% +0.04%
==========================================
Files 92 92
Lines 6516 6516
==========================================
+ Hits 2184 2187 +3
+ Misses 4199 4197 -2
+ Partials 133 132 -1
Continue to review full report at Codecov.
|
panic(err) | ||
} | ||
} else if err != nil && !os.IsExist(err) { | ||
// 这里的错误,是说明出现了未知的错误,应该抛出 | ||
panic(err) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已存在的情况,也还需要尝试更新下模板
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果已经存在,也尝试拉取模板,这缓存不就没有意义了吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不然模板会一直不更新呀,可以考虑根据文件变更时间决定,比如超过1天就更新下,pull增量的部分比全量pull还是会快很多
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另一个思路是,让用户确认是否更新模板,可以参考oh-my-zsh的玩法 :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这样可以不只是更新模板,还可以更新下脚手架本身
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
* feat#336 add cache and clean features * compatible with windows and Unix * perfect the content * add one todo
Describe what this PR does / why we need it
Does this pull request fix one issue?
Describe how you did it
Describe how to verify it
Special notes for reviews