Skip to content

Commit

Permalink
rename namespace to Kite
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed May 28, 2020
1 parent f266e96 commit 3de8b1b
Show file tree
Hide file tree
Showing 36 changed files with 595 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ vendor/
.env
.phpstorm.meta.php
.DS_Store
.ptool.inc
.kite.inc
bin/php-cs-fixer
File renamed without changes.
2 changes: 1 addition & 1 deletion .php_cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$header = <<<'EOF'
This file is part of PTool.
This file is part of Kite.
@link https://github.com/inhere
@author https://github.com/inhere
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# PTool [中文说明](README.zh-CN.md)
# Kite [中文说明](README.zh-CN.md)

[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/inhere/ptool)](https://github.com/inhere/ptool)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/inhere/kite)](https://github.com/inhere/kite)

My person CLI tool package.

> Github https://github.com/inhere/ptool
> Github https://github.com/inhere/kite
**Preview:**

Expand All @@ -19,18 +19,18 @@ My person CLI tool package.
### Install by script

```bash
curl https://github.com/inhere/ptool/master/install.sh | bash
curl https://github.com/inhere/kite/master/install.sh | bash
```

### Manual install

```bash
cd ~
git clone https://github.com/inhere/ptool .ptool
cd .ptool
git clone https://github.com/inhere/kite .kite
cd .kite
composer install
ln -s $PWD/bin/ptool /usr/local/bin/ptool
chmod a+x bin/ptool
ln -s $PWD/bin/kite /usr/local/bin/kite
chmod a+x bin/kite
```

## Usage
Expand All @@ -41,13 +41,13 @@ Execute:

```bash
# 1. add remote for all components
ptool git:addrmt --all
kite git:addrmt --all

# 2. force push all change to every github repo
ptool git:fpush --all
kite git:fpush --all

# 3. release new version for all components
ptool git:release --all -y -t v2.0.8
kite git:release --all -y -t v2.0.8
```

## Update
Expand All @@ -57,30 +57,30 @@ ptool git:release --all -y -t v2.0.8
Use builtin command for update tool to latest

```bash
ptool upself
kite upself
```

### Manual update

```bash
cd ~/ptool
cd ~/kite
git pull
chmod a+x bin/ptool
chmod a+x bin/kite
```

## Build Phar

> Required the `swoftcli`
```bash
php -d phar.readonly=0 ~/.composer/vendor/bin/swoftcli phar:pack -o=ptool.phar
php -d phar.readonly=0 ~/.composer/vendor/bin/swoftcli phar:pack -o=kite.phar
```

## Uninstall

```bash
rm -f /usr/local/bin/ptool
rm -rf ~/.ptool
rm -f /usr/local/bin/kite
rm -rf ~/.kite
```

## Dep Packages
Expand Down
34 changes: 17 additions & 17 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# PTool [English](README.md)
# Kite [English](README.md)

[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/inhere/ptool)](https://github.com/inhere/ptool)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/inhere/kite)](https://github.com/inhere/kite)

My person CLI tool package.

> Github https://github.com/inhere/ptool
> Github https://github.com/inhere/kite
**Preview:**

Expand All @@ -19,18 +19,18 @@ My person CLI tool package.
### 脚本安装

```bash
curl https://github.com/inhere/ptool/master/install.sh | bash
curl https://github.com/inhere/kite/master/install.sh | bash
```

### 手动安装

```bash
cd ~
git clone https://github.com/inhere/ptool .ptool
cd .ptool
git clone https://github.com/inhere/kite .kite
cd .kite
composer install
ln -s $PWD/bin/ptool /usr/local/bin/ptool
chmod a+x bin/ptool
ln -s $PWD/bin/kite /usr/local/bin/kite
chmod a+x bin/kite
```

## Usage
Expand All @@ -39,13 +39,13 @@ Execute:

```bash
# 1. add remote for all components
ptool git:addrmt --all
kite git:addrmt --all

# 2. force push all change to every github repo
ptool git:fpush --all
kite git:fpush --all

# 3. release new version for all components
ptool git:release --all -y -t v2.0.8
kite git:release --all -y -t v2.0.8
```

## Update
Expand All @@ -55,30 +55,30 @@ ptool git:release --all -y -t v2.0.8
Use builtin command for update tool to latest

```bash
ptool upself
kite upself
```

### Manual update

```bash
cd ~/ptool
cd ~/kite
git pull
chmod a+x bin/ptool
chmod a+x bin/kite
```

## Build Phar

> Required the `swoftcli`
```bash
php -d phar.readonly=0 ~/.composer/vendor/bin/swoftcli phar:pack -o=ptool.phar
php -d phar.readonly=0 ~/.composer/vendor/bin/swoftcli phar:pack -o=kite.phar
```

## Uninstall

```bash
rm -f /usr/local/bin/ptool
rm -rf ~/.ptool
rm -f /usr/local/bin/kite
rm -rf ~/.kite
```

## Dep Packages
Expand Down
58 changes: 58 additions & 0 deletions app/Common/BatchRunner.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php declare(strict_types=1);

namespace Inhere\Kite\Common;

/**
* Class BatchExec
*
* @package Inhere\Kite\Common
*/
class BatchRunner
{
/**
* Ignore check prevision return code
*
* @var bool
*/
private $ignoreCode = false;

/**
* [
* 'echo hi',
* 'do something'
* ]
*
* @var array
*/
private $commands;

/**
* Class constructor.
*
* @param array $commands
*/
public function __construct(array $commands)
{
$this->commands = $commands;
}

/**
* @param bool $ignoreCode
*
* @return BatchRunner
*/
public function setIgnoreCode(bool $ignoreCode): BatchRunner
{
$this->ignoreCode = $ignoreCode;
return $this;
}

/**
* @return bool
*/
public function isIgnoreCode(): bool
{
return $this->ignoreCode;
}

}
4 changes: 2 additions & 2 deletions app/Common/CliMarkdown.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace Inhere\PTool\Common;
namespace Inhere\Kite\Common;

use cebe\markdown\GithubMarkdown;
use Toolkit\Cli\ColorTag;
Expand All @@ -12,7 +12,7 @@
/**
* Class CliMarkdown
*
* @package Inhere\PTool\Common
* @package Inhere\Kite\Common
* @link https://github.com/charmbracelet/glow color refer
*/
class CliMarkdown extends GithubMarkdown
Expand Down
Loading

0 comments on commit 3de8b1b

Please sign in to comment.