fedora-infra / rpmautospec

Automatically generate release values and changelog entries from git history in RPM spec files
MIT License
4 stars 7 forks source link

Handle special cases of process-distgit's target #209

Open HauserV opened 1 week ago

HauserV commented 1 week ago

This PR proposes two minor convenience improvements to the way process-distgit handles its argument target:

  1. Until https://github.com/fedora-infra/rpmautospec/commit/25c8f40bef4b2fb9e410023998cf97d5ab24483d, the command would always overwrite the original spec file. That commit introduced a new argument target, which made it possible to store the output elsewhere. This PR exposes the original behavior in the CLI, giving users the option to overwrite the spec file in-place.
  2. If the target is a directory, the command copies the temporary file with the expanded spec into the directory as-is. The second improvement uses the original spec's name instead of the randomly generated temporary one.