This repository has been archived by the owner on May 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRoboFile.php
52 lines (47 loc) · 1.49 KB
/
RoboFile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
use Symfony\Component\Finder\Finder;
class RoboFile extends \Robo\Tasks
{
/**
* Build the Robo phar executable.
*/
public function pharBuild()
{
$this->_exec('phing');
}
public function pharSign()
{
// signing key: [email protected]
$this->_exec('gpg -u 5AECD819 --detach-sign --output imi-conrun.phar.asc imi-conrun.phar');
}
/**
* Publish iRobo to github
*
* @return \Robo\Result
*/
public function pharPublish()
{
$token = $this->ask('Github Token');
$tag = $this->ask('Tag');
$repo = 'imi-conrun';
return $this->taskExecStack()
->exec('github-release release --security-token ' . escapeshellarg($token)
. ' --user imi-digital --repo ' . $repo
. ' --tag ' . escapeshellarg($tag))
// we upload a .phar and the same file without extension
// .phar seems to be needed for Phive installer
->exec('github-release upload --security-token ' . escapeshellarg($token)
. ' --user imi-digital --repo ' . $repo
. ' --tag ' . escapeshellarg($tag)
. ' --file imi-conrun.phar'
. ' --name imi-conrun.phar'
)
->exec('github-release upload --security-token ' . escapeshellarg($token)
. ' --user imi-digital --repo ' . $repo
. ' --tag ' . escapeshellarg($tag)
. ' --file imi-conrun.phar.asc'
. ' --name imi-conrun.phar.asc'
)
->run();
}
}