|
|
|
@ -8,6 +8,7 @@ import (
|
|
|
|
|
"path/filepath"
|
|
|
|
|
"strconv"
|
|
|
|
|
"strings"
|
|
|
|
|
"regexp"
|
|
|
|
|
|
|
|
|
|
"code.gitea.io/sdk/gitea"
|
|
|
|
|
gha "github.com/sethvargo/go-githubactions"
|
|
|
|
@ -107,7 +108,13 @@ func getDirFiles(dir string) ([]string, error) {
|
|
|
|
|
|
|
|
|
|
func getFiles(parentDir, files string) ([]string, error) {
|
|
|
|
|
var fileList []string
|
|
|
|
|
lines := strings.Split(files, "\n")
|
|
|
|
|
fmt.Printf("the value of the files is: %s\n", files)
|
|
|
|
|
reg := regexp.MustCompile(`[^\s"']+|"([^"]*)"|'([^']*)'`)
|
|
|
|
|
arr := reg.FindAllString(files, -1)
|
|
|
|
|
fmt.Printf("the value after splitting by spaces is: %s\n", strings.Join(arr, ", "))
|
|
|
|
|
for _, str := range arr {
|
|
|
|
|
lines := strings.Split(str, "\n")
|
|
|
|
|
fmt.Printf("the value after splitting %s by \\n is: %s\n", str, strings.Join(lines, ", "))
|
|
|
|
|
for _, line := range lines {
|
|
|
|
|
line = strings.Trim(line, "'")
|
|
|
|
|
line = strings.Trim(line, `"`)
|
|
|
|
@ -127,6 +134,7 @@ func getFiles(parentDir, files string) ([]string, error) {
|
|
|
|
|
fileList = append(fileList, files...)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return fileList, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|