feat(*): dryRun/debug mode/mode plugins/googleapis

Signed-off-by: storyicon <yuanchao@bilibili.com>
This commit is contained in:
storyicon 2021-07-21 20:25:38 +08:00
parent 9aac714c32
commit da77c8086d
No known key found for this signature in database
GPG key ID: 245915D985F966CF
26 changed files with 730 additions and 126 deletions

View file

@ -23,7 +23,6 @@ import (
"github.com/storyicon/powerproto/pkg/util"
)
// PathForInclude is used to get the local directory of include files
func PathForInclude(storageDir string) string {
return filepath.Join(storageDir, "include")
@ -47,6 +46,11 @@ func GetPluginPath(path string, version string) (string, error) {
return filepath.Join(enc + "@" + encVer), nil
}
// PathForGoogleAPIs is used to get the google apis path
func PathForGoogleAPIs(storageDir string, commitId string) string {
return filepath.Join(storageDir, "googleapis", commitId)
}
// PathForPluginDir is used to get the local directory where the specified version plug-in should be stored
func PathForPluginDir(storageDir string, path string, version string) (string, error) {
pluginPath, err := GetPluginPath(path, version)