Revert "feat: cctuip lands in main"

See toolshed/abra#691 (comment)
This commit is contained in:
2025-10-17 19:27:23 +02:00
parent fc16a21f1c
commit 5b504a1550
8 changed files with 399 additions and 476 deletions

View File

@ -644,9 +644,6 @@ func (a App) WriteRecipeVersion(version string, dryRun bool) error {
scanner = bufio.NewScanner(file)
)
// NOTE(d1): don't care at this point if there is a git failure
isDirty, _ := a.Recipe.IsDirty()
for scanner.Scan() {
line := scanner.Text()
if !strings.HasPrefix(line, "RECIPE=") && !strings.HasPrefix(line, "TYPE=") {
@ -659,7 +656,7 @@ func (a App) WriteRecipeVersion(version string, dryRun bool) error {
continue
}
if strings.Contains(line, version) && !isDirty && !strings.HasSuffix(line, config.DIRTY_DEFAULT) {
if strings.Contains(line, version) && !a.Recipe.Dirty && !strings.HasSuffix(line, config.DIRTY_DEFAULT) {
skipped = true
lines = append(lines, line)
continue
@ -672,16 +669,16 @@ func (a App) WriteRecipeVersion(version string, dryRun bool) error {
}
if err := scanner.Err(); err != nil {
return err
log.Fatal(err)
}
if isDirty && dirtyVersion != "" {
if a.Recipe.Dirty && dirtyVersion != "" {
version = dirtyVersion
}
if !dryRun {
if err := os.WriteFile(a.Path, []byte(strings.Join(lines, "\n")), os.ModePerm); err != nil {
return err
log.Fatal(err)
}
} else {
log.Debug(i18n.G("skipping writing version %s because dry run", version))