Skip to content

Commit 04307a0

Browse files
committed
template: Fix errors in debian/watch track git HEAD comment
by switching from fmt.Fprintf to fmt.Fprint where appropriate
1 parent 48ca798 commit 04307a0

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

template.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -339,35 +339,35 @@ func writeDebianWatch(dir, gopkg, debsrc string, hasRelease bool, repack bool) e
339339
fmt.Fprint(f, `opts="filenamemangle=`+filenamemanglePattern+`,\`+"\n")
340340
fmt.Fprint(f, ` uversionmangle=`+uversionmanglePattern)
341341
if repack {
342-
fmt.Fprintf(f, `,\`+"\n")
343-
fmt.Fprintf(f, ` dversionmangle=s/\+ds\d*$//,repacksuffix=+ds1`)
342+
fmt.Fprint(f, `,\`+"\n")
343+
fmt.Fprint(f, ` dversionmangle=s/\+ds\d*$//,repacksuffix=+ds1`)
344344
}
345-
fmt.Fprintf(f, `" \`+"\n")
345+
fmt.Fprint(f, `" \`+"\n")
346346
fmt.Fprintf(f, ` https://%s/%s/%s/tags .*/v?(\d\S*)\.tar\.gz debian`+"\n", host, owner, repo)
347347
} else {
348348
log.Printf("Setting debian/watch to track git HEAD")
349-
fmt.Fprintf(f, "version=4\n")
350-
fmt.Fprintf(f, `opts="mode=git, pgpmode=none`)
349+
fmt.Fprint(f, "version=4\n")
350+
fmt.Fprint(f, `opts="mode=git, pgpmode=none`)
351351
if repack {
352-
fmt.Fprintf(f, `,\`+"\n")
353-
fmt.Fprintf(f, ` dversionmangle=s/\+ds\d*$//,repacksuffix=+ds1`)
352+
fmt.Fprint(f, `,\`+"\n")
353+
fmt.Fprint(f, ` dversionmangle=s/\+ds\d*$//,repacksuffix=+ds1`)
354354
}
355-
fmt.Fprintf(f, `" \`+"\n")
355+
fmt.Fprint(f, `" \`+"\n")
356356
fmt.Fprintf(f, ` https://%s/%s/%s.git \`+"\n", host, owner, repo)
357-
fmt.Fprintf(f, " HEAD debian\n")
357+
fmt.Fprint(f, " HEAD debian\n")
358358

359359
// Anticipate that upstream would eventually switch to tagged releases
360-
fmt.Fprintf(f, "\n")
361-
fmt.Fprintf(f, "# Use the following when upstream starts to tag releases:\n")
362-
fmt.Fprintf(f, "#\n")
363-
fmt.Fprintf(f, "#version=4\n")
364-
fmt.Fprintf(f, `#opts="filenamemangle=`+filenamemanglePattern+`,\`+"\n", debsrc)
365-
fmt.Fprintf(f, `# uversionmangle=`+uversionmanglePattern)
360+
fmt.Fprint(f, "\n")
361+
fmt.Fprint(f, "# Use the following when upstream starts to tag releases:\n")
362+
fmt.Fprint(f, "#\n")
363+
fmt.Fprint(f, "#version=4\n")
364+
fmt.Fprint(f, `#opts="filenamemangle=`+filenamemanglePattern+`,\`+"\n")
365+
fmt.Fprint(f, `# uversionmangle=`+uversionmanglePattern)
366366
if repack {
367-
fmt.Fprintf(f, `,\`+"\n")
368-
fmt.Fprintf(f, `# dversionmangle=s/\+ds\d*$//,repacksuffix=+ds1`)
367+
fmt.Fprint(f, `,\`+"\n")
368+
fmt.Fprint(f, `# dversionmangle=s/\+ds\d*$//,repacksuffix=+ds1`)
369369
}
370-
fmt.Fprintf(f, `" \`+"\n")
370+
fmt.Fprint(f, `" \`+"\n")
371371
fmt.Fprintf(f, `# https://%s/%s/%s/tags .*/v?(\d\S*)\.tar\.gz debian`+"\n", host, owner, repo)
372372
}
373373

0 commit comments

Comments
 (0)