pushdeer/push/gorush-with-mipush/RoboFile.php

25 lines
588 B
PHP
Raw Normal View History

2022-02-07 20:05:26 +08:00
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
// define public methods as commands
public function buildMac()
{
$this->_exec("cd src && go build -o ../bin/gorush.mac");
}
public function testMac()
{
$this->_exec("bin/gorush.mac -c ../src/config/testdata/config.online.yml");
}
public function buildLinux()
{
$this->_exec("cd src && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../../../docker/web/gorush");
2022-02-07 20:05:26 +08:00
}
}