[opensuse-buildservice] osc scripting
This is for a private OBS, but I don't think it really matters that it's private... I'm trying to write a script that will generate a tarball from a source repository (ie. git archive --format=tar <branch> | bzip2 > foo.tar.bz2), and then commit the new changes into OBS. Naturally, I'd like to move the commit message from git into the commit for OBS. I know that: osc api -m PUT -f <file> source/<project>/<package>/<destfile> will commit the file into the package as desired, but I believe this doesn't allow for commit messages to be appended. I'd like to have some sort of corollation between the source repository and OBS's repository. Would I then need to follow with: osc api -m POST /source/<project>/<package>?cmd=commit <something> to get the commit message in. I figure somebody's already tried this before, and thought I'd ping the list and see what I need to do. Thanks. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Dienstag, 23. März 2010 22:02:51 schrieb Troy Telford:
This is for a private OBS, but I don't think it really matters that it's private...
I'm trying to write a script that will generate a tarball from a source repository (ie. git archive --format=tar <branch> | bzip2 > foo.tar.bz2), and then commit the new changes into OBS. Naturally, I'd like to move the commit message from git into the commit for OBS.
what about osc ci -m "my message" ?
I know that: osc api -m PUT -f <file> source/<project>/<package>/<destfile>
will commit the file into the package as desired, but I believe this doesn't allow for commit messages to be appended. I'd like to have some sort of corollation between the source repository and OBS's repository.
Would I then need to follow with: osc api -m POST /source/<project>/<package>?cmd=commit <something> to get the commit message in.
I figure somebody's already tried this before, and thought I'd ping the list and see what I need to do.
Thanks.
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Why do it so low-level? You can call the Package.commit method in osc if you use python. Or if you're not in python, you can just do osc co and osc ci -m MESSAGE like you would as a normal user. Is the time to do a checkout of the full package an issue for you? On Tue, 2010-03-23 at 16:02 -0500, Troy Telford wrote:
This is for a private OBS, but I don't think it really matters that it's private...
I'm trying to write a script that will generate a tarball from a source repository (ie. git archive --format=tar <branch> | bzip2 > foo.tar.bz2), and then commit the new changes into OBS. Naturally, I'd like to move the commit message from git into the commit for OBS.
I know that: osc api -m PUT -f <file> source/<project>/<package>/<destfile>
will commit the file into the package as desired, but I believe this doesn't allow for commit messages to be appended. I'd like to have some sort of corollation between the source repository and OBS's repository.
Would I then need to follow with: osc api -m POST /source/<project>/<package>?cmd=commit <something> to get the commit message in.
I figure somebody's already tried this before, and thought I'd ping the list and see what I need to do.
Thanks.
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Why do it so low-level? You can call the Package.commit method in osc if you use python. Or if you're not in python, you can just do osc co and osc ci -m MESSAGE like you would as a normal user. Is the time to do a checkout of the full package an issue for you?
I haven't looked inside osc's source yet; but if Package.commit does what I need, then that's wonderful. And yes, I am trying to avoid having to do a full checkout when it's not necessary. Especially if it's not difficult to directly push the file into the project/package with the message. -- Troy Telford ttelford.groups@gmail.com -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Adrian Schröter
-
Luke Imhoff
-
Troy Telford