Red Hat Bugzilla – Bug 824693
Last modified: 2013-06-06 21:12:20 EDT
Currently when using CSP to build a book and then brew it, we need to manually check out and edit the pubsnumber in the content spec file. It would be handy if a command was available to increment the specified pubsnumber value without having to pull it the whole spec again.
csprocessor pubsnum <increment by> <SPECID>
Increment by could be an optional field to increment the number by more than just 1. This command would ideally also allow users to inject a pubsnum field and default value (1) or specific value (manually incremented pubsnum for the past four brews, now want to set pubsnum+4.
This would just be a simple way to reduce the unnecessary step in the workflow where we must get the content spec anew and update the pubsnum value and push it back.
We already have this partially. You can currently do:
csprocessor build <SPECID> --override pubsnumber=<NUMBER>
Though an incremental option is a good idea. Perhaps something like:
csprocessor build <SPECID> --override pubsnumber=+<NUMBER>
Would the following just override the original entry in the content spec with a new number or set the number to the incremented value permanently.
What I had in mind was that for someone with multiple books, they would not need to recall what the last override was but just add a (non build) command to accept the pubsnum value and add 1 to it and save the new value in the content spec.
This way, I don't need to know what the number is, just that I need to increment it, most likely as an additional step in my build and brew process, right after a successful build so that it is ready to go for next time.
Hmm hadn't thought much about that but it's a good point. What I would like to do (and why I haven't done much on this) is have a command to get the correct pubsnumber from Brew. Doing this would then allow a publish command (see Bug #829947) to be created.
When a csprocessor project is created or checked out the KOJI_HUB_URL will be blank in the csprocessor.cfg file. This means that it will attempt to use the default value from csprocessor.ini. This can be changed by adding a URL to the csprocessor.cfg file for the KOJI_HUB_URL variable.