mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-12-04 18:36:26 +00:00
set sensible defaults for committer, and fix some import prefix branch usage
This commit is contained in:
parent
5762a402c2
commit
a7cb786293
@ -114,8 +114,8 @@ func main() {
|
||||
|
||||
root.Flags().StringVar(&sshKeyLocation, "ssh-key-location", "", "Location of the SSH key to use to authenticate against upstream")
|
||||
root.Flags().StringVar(&sshUser, "ssh-user", "git", "SSH User")
|
||||
root.Flags().StringVar(&gitCommitterName, "git-committer-name", "distrobuild-bot", "Name of committer")
|
||||
root.Flags().StringVar(&gitCommitterEmail, "git-committer-email", "mustafa+distrobuild@bycrates.com", "Email of committer")
|
||||
root.Flags().StringVar(&gitCommitterName, "git-committer-name", "rockyautomation", "Name of committer")
|
||||
root.Flags().StringVar(&gitCommitterEmail, "git-committer-email", "rockyautomation@rockylinux.org", "Email of committer")
|
||||
root.Flags().StringVar(&modulePrefix, "module-prefix", "https://git.centos.org/modules", "Where to retrieve modules if exists. Only used when source-rpm is a git repo")
|
||||
root.Flags().StringVar(&rpmPrefix, "rpm-prefix", "https://git.centos.org/rpms", "Where to retrieve SRPM content. Only used when source-rpm is not a local file")
|
||||
root.Flags().StringVar(&importBranchPrefix, "import-branch-prefix", "c", "Import branch prefix")
|
||||
|
@ -134,7 +134,7 @@ func ProcessRPM(pd *ProcessData) {
|
||||
var matchString string
|
||||
if !tagImportRegex.MatchString(md.tagBranch) {
|
||||
if pd.ModuleMode {
|
||||
prefix := fmt.Sprintf("refs/heads/c%d", pd.Version)
|
||||
prefix := fmt.Sprintf("refs/heads/%s%d", pd.ImportBranchPrefix, pd.Version)
|
||||
if strings.HasPrefix(md.tagBranch, prefix) {
|
||||
replace := strings.Replace(md.tagBranch, "refs/heads/", "", 1)
|
||||
matchString = fmt.Sprintf("refs/tags/imports/%s/%s", replace, filepath.Base(pd.RpmLocation))
|
||||
@ -142,7 +142,7 @@ func ProcessRPM(pd *ProcessData) {
|
||||
}
|
||||
}
|
||||
if !tagImportRegex.MatchString(matchString) {
|
||||
log.Fatal("import tag invalid")
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
matchString = md.tagBranch
|
||||
|
Loading…
Reference in New Issue
Block a user