502
by Robert Ancell
Add license header to source files |
1 |
/*
|
2 |
* Copyright (C) 2011-2012 Robert Ancell <robert.ancell@gmail.com>
|
|
3 |
*
|
|
4 |
* This program is free software: you can redistribute it and/or modify it under
|
|
5 |
* the terms of the GNU General Public License as published by the Free Software
|
|
6 |
* Foundation, either version 3 of the License, or (at your option) any later
|
|
7 |
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
|
|
8 |
* license.
|
|
9 |
*/
|
|
10 |
||
162
by Robert Ancell
Add Launchpad support |
11 |
public class LaunchpadModule : BuildModule |
12 |
{
|
|
13 |
public override void generate_toplevel_rules (Recipe recipe) |
|
14 |
{
|
|
15 |
if (Environment.find_program_in_path ("lp-project-upload") == null) |
|
16 |
return; |
|
17 |
||
438
by Robert Ancell
Rename package.* variables to project.* and fix documentation inconsistency |
18 |
if (recipe.project_version != null) |
183
by Robert Ancell
Don't generate tag rules if no version number |
19 |
{
|
20 |
var rule = recipe.add_rule (); |
|
283
by Robert Ancell
Use functions to control rule inputs/outputs/commands |
21 |
rule.add_output ("%release-launchpad"); |
22 |
rule.add_input ("%s.tar.gz".printf (recipe.release_name)); |
|
438
by Robert Ancell
Rename package.* variables to project.* and fix documentation inconsistency |
23 |
rule.add_command ("lp-project-upload %s %s %s.tar.gz".printf (recipe.project_name, recipe.project_version, recipe.release_name)); |
183
by Robert Ancell
Don't generate tag rules if no version number |
24 |
}
|
162
by Robert Ancell
Add Launchpad support |
25 |
}
|
26 |
}
|