Commit graph

44 commits

Author SHA1 Message Date
Devan Goodwin
05e3b80205 Extract version/release in external source builder. 2014-01-09 15:20:04 -04:00
Devan Goodwin
381debd36b Replace external sources in spec file copy during build. 2014-01-03 14:28:26 -04:00
Devan Goodwin
199f332d4d Start building with external sources and no tag.
Currently uses the files in the directory where tito was initially run, hoping to make this smarter and more useful soon.
2014-01-02 15:20:52 -04:00
Devan Goodwin
a3363cb93f Merge the FiledVersionTagger into the base VersionTagger.
This allows the behaviour to be used in just about any tagger sub-class.

Behaviour will be triggered on the presence of the 'version_template'
section in tito.props.

Renamed config:
  version -> version_template (section)
  file -> destination_file

Separated the replacement of version and release, as caller may just
want one or the other. (it works fine if only one of the variables is
present in your template file) Release is more of an rpm concept so may
not always be wanted in this context.

Removed the notion of default template files, if you want to use this
you need to specify the configuration for it.

Added a functional test to make sure I keep it working.
2013-11-12 13:28:32 -04:00
Devan Goodwin
373139efd5 Add test for recent pull request. 2013-02-26 08:55:54 -04:00
James Bowes
e3a6111072 Add a Travis configuration
Travis[1] runs continuous integration for Open Source projects. With
github, it will run the configured tests and tag pull requests as passing
or failing. This commit adds a Travis configuration.

Since Travis hosts run debian/ubuntu, and execute tests in virtualenv,
getting access to `rpm` and `python-rpm` is impossible, or nontrivial,
at least. For now, ignore the functional tests. To support running the
BuildTargetParser tests, pull that class out into its own module, and
away from release.py, which imports `rpm`.

To configure travis, go to the website, log in with your github account,
then sync your repos under the account tab below your name. Then just
switch the repo to 'on' and it should be all set up.

[1]: http://travis-ci.org
2012-11-10 10:49:28 -04:00
jesus m. rodriguez
be8494f351 Merge pull request #46 from mstead/master
Added ability to specify build targets for DistGitReleaser and FedoraReleaser.
2012-09-21 11:55:43 -07:00
Ivan Necas
e97f8539fc Handle stderr noise getting from remote server
Use regular expression to extract the SHA1 from the `git ls-remote` call
response. The reason is that there might be some messages in the
response going to stderr, that are captured when using run_command,
e.g.:

```
Could not chdir to home directory /home/johndoe: No such file or directory
fe87e2b75ed1850718d99c797cc171b88bfad5ca refs/tags/my-awesome-lib-1.0.1-1
```

I used 30 and more characters for the regular expression because I was
not sure the SHA1 is always shown as 40 characters. However we can be
quite certain that the word of 30 and more [0-9a-f] characters is a
SHA1.
2012-09-07 14:16:05 +02:00
Michael Stead
61c996977b Can now specify a build target for fedora and distgit releasers
Tito only supported the default build target when releasing,
however, in some cases it was necessisary to change it (building
for zstream for example).

By default, the build target is the same as the branch. With this
change, you can specify a build target on a per branch basis by
adding a 'build_targets' property in the releasers.conf file.

This property takes on the following format:
   build_targets = <branch>:<build_target> <branch>:<build_target> ...

An example configuration could be:

[project-x.y.z]
releaser = tito.release.DistGitReleaser
branches = project-x.y
build_targets = project-x.y:project-x.y.z-candidate

Running:
    tito release project-x.y.z

would instruct the build system to build with the target
'project-x.y.z-candidate' when building from the project-x.y
branch (i.e rhpkg build --no-wait --target project-x.y.z-candidate).
2012-06-20 15:17:09 -03:00
jesus m. rodriguez
c1df0a1a81 PEP8 cleanup 2011-12-05 14:37:07 -05:00
Devan Goodwin
8246ec2b79 Functional test fix. 2011-11-25 11:30:51 -04:00
Alex Wood
3a621a9cc2 Adding --use-version to allow Tito to force a version to use. 2011-10-21 16:23:01 -04:00
Alex Wood
fd4af9ef85 Parsing spec files and bumping their versions or releases is now in Python. 2011-10-13 13:38:42 -04:00
Devan Goodwin
c7be95791b Fix CVS release Bugzilla extraction.
Neglected that changelog entries start out with a -.
2011-01-24 17:32:11 -04:00
Devan Goodwin
d54101cbef Improved bugzilla ID extraction. 2011-01-14 16:58:03 -04:00
Devan Goodwin
e1ab44abfd Add code for extracting bugzilla IDs from CVS diff or git log. 2011-01-14 16:40:12 -04:00
Devan Goodwin
dc27216b51 Add some multi-project builder tests. 2010-05-24 23:16:49 -03:00
Devan Goodwin
7e8017571f Port multi-project git tests to use GitPython more. 2010-05-24 14:59:50 -03:00
Devan Goodwin
73413b30bd Better tag undo test. 2010-05-24 13:51:48 -03:00
Devan Goodwin
a29185f8c5 Port remaining single project tests to new format. 2010-05-24 11:35:07 -03:00
Devan Goodwin
bd84de04c7 Better test repo/project creation. 2010-05-24 11:26:22 -03:00
Devan Goodwin
e49b6f77cf Begin testing with GitPython. 2010-05-24 00:56:30 -03:00
Devan Goodwin
a0cdf98405 Test tito via CLI class rather than shell commands.
Should allow for much better error checking.
2010-05-24 00:44:47 -03:00
Devan Goodwin
55d2e86be3 Bump versions in setup.py during tagging if possible. 2010-05-23 12:06:15 -03:00
Devan Goodwin
f6eedc27bb Introduce --output option for destination/tmp directory. 2009-08-02 14:53:41 -03:00
Devan Goodwin
b0843d6b66 Use tito.props for project specific config filename.
Aparently we were still using legacy build.py.props from before the tito
rename.
2009-08-02 14:22:06 -03:00
Devan Goodwin
3461d47cc9 Add multi-project repo tagging tests. 2009-08-02 13:46:03 -03:00
Devan Goodwin
a393dfbfda Create a multi-project git repository for testing. 2009-08-02 12:33:36 -03:00
Devan Goodwin
6dd00ae3bc Test additions and improvements.
And a rename to something more appropriate.
2009-07-29 21:00:35 -03:00
James Bowes
515815dcbc pyflakes cleanup
Signed-off-by: Devan Goodwin <dgoodwin@rm-rf.ca>
2009-07-27 00:08:21 +08:00
Devan Goodwin
0de5290258 Expand tagging tests. 2009-07-25 12:39:22 -03:00
Devan Goodwin
1f587f0f3c Kinda support running nosetests manually.
Will fail unless you have tito installed on your system. In this case
only the bare tito script in bin and seldom modified perl scripts will
be used from the installed version, the code should still run against
the source.
2009-07-25 11:54:06 -03:00
Devan Goodwin
6ea3f432bc Re-enable functional tests, add top level runtests.py.
Path hacks currently requiring this, though we still use python-nose
once it's time to actually call the tests. Still probably a solution to
get rid of the test script...
2009-07-25 11:50:02 -03:00
Devan Goodwin
e5e98bc098 Big test refactor.
Introduce unit test framework, disable functional test framework for
now, but getting closer to something that's sensible.
2009-07-24 23:00:45 -03:00
Devan Goodwin
698d9962ba Namespace rename, spacewalk.releng -> tito. 2009-07-24 22:18:05 -03:00
Devan Goodwin
af72fd5572 Prep for namespace change spacewalk.releng -> tito. 2009-07-24 22:11:25 -03:00
Devan Goodwin
e785c77f0c Fix path to aux Perl scripts.
For now we'll expect these to be on PATH, though in the long term they
will hopefully be ported to pure Python code and folded right into the
library.
2009-07-21 21:59:38 -03:00
Devan Goodwin
0ea74fdc6c More tests work.
Still not much here and not positive this is the best route to go.
2009-07-21 21:48:32 -03:00
Devan Goodwin
78eebada69 Test "tito init". 2009-07-21 18:10:34 -03:00
Steve 'Ashcrow' Milner
cbd2a68b96 updated all source to match base requirements for pep8
Signed-off-by: Devan Goodwin <dgoodwin@rm-rf.ca>
2009-07-22 01:56:11 +08:00
Steve 'Ashcrow' Milner
e8929afb54 moved all prints to 3.0 style
Signed-off-by: Devan Goodwin <dgoodwin@rm-rf.ca>
2009-07-21 20:08:23 +08:00
Steve 'Ashcrow' Milner
0668e526b4 updated license in all source files
Signed-off-by: Devan Goodwin <dgoodwin@rm-rf.ca>
2009-07-21 20:08:18 +08:00
Devan Goodwin
f7ed5d3e1e More work on test script. 2009-07-20 23:59:28 -03:00
Devan Goodwin
333b28663b Start a runtests.py script to setup a faux git repo for testing.
We'll soon be running 'unit' tests inside this git repo to ensure tito
does what it's supposed to do.
2009-07-20 23:44:56 -03:00