mirror of
https://github.com/n3w/helpers-functions-cli.git
synced 2025-12-19 12:43:22 +00:00
Updated README, CHANGELOG, and LICENCE for 1.1.9 release
This commit is contained in:
parent
3ccfe2477f
commit
593410a68b
3 changed files with 25 additions and 5 deletions
|
|
@ -3,6 +3,12 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## [1.1.9][]
|
||||||
|
#### Added
|
||||||
|
- Added `run_command()` function
|
||||||
|
- Added `RunCommandFailedException` exception
|
||||||
|
- Added `pointybeard/helpers-exceptions-readabletrace` package
|
||||||
|
|
||||||
## [1.1.8][]
|
## [1.1.8][]
|
||||||
#### Changed
|
#### Changed
|
||||||
- Updated `manpage()` to work with `pointybeard/helpers-cli-input` 1.2
|
- Updated `manpage()` to work with `pointybeard/helpers-cli-input` 1.2
|
||||||
|
|
@ -53,6 +59,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
#### Added
|
#### Added
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|
||||||
|
[1.1.9]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.8...1.1.9
|
||||||
[1.1.8]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.7...1.1.8
|
[1.1.8]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.7...1.1.8
|
||||||
[1.1.7]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.6...1.1.7
|
[1.1.7]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.6...1.1.7
|
||||||
[1.1.6]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.5...1.1.6
|
[1.1.6]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.5...1.1.6
|
||||||
|
|
|
||||||
2
LICENCE
2
LICENCE
|
|
@ -3,7 +3,7 @@ unless otherwise specified, released under the MIT licence as follows:
|
||||||
|
|
||||||
----- begin license block -----
|
----- begin license block -----
|
||||||
|
|
||||||
Copyright 2019 Alannah Kearney
|
Copyright 2019-2020 Alannah Kearney
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
21
README.md
21
README.md
|
|
@ -1,7 +1,7 @@
|
||||||
# PHP Helpers: Command-line Functions
|
# PHP Helpers: Command-line Functions
|
||||||
|
|
||||||
- Version: v1.1.8
|
- Version: v1.1.9
|
||||||
- Date: June 01 2019
|
- Date: April 06 2020
|
||||||
- [Release notes](https://github.com/pointybeard/helpers-functions-cli/blob/master/CHANGELOG.md)
|
- [Release notes](https://github.com/pointybeard/helpers-functions-cli/blob/master/CHANGELOG.md)
|
||||||
- [GitHub repository](https://github.com/pointybeard/helpers-functions-cli)
|
- [GitHub repository](https://github.com/pointybeard/helpers-functions-cli)
|
||||||
|
|
||||||
|
|
@ -30,6 +30,7 @@ The following functions are provided:
|
||||||
|
|
||||||
- `can_invoke_bash()`
|
- `can_invoke_bash()`
|
||||||
- `is_su()`
|
- `is_su()`
|
||||||
|
- `run_command()`
|
||||||
- `usage()`
|
- `usage()`
|
||||||
- `manpage()`
|
- `manpage()`
|
||||||
- `get_window_size()`
|
- `get_window_size()`
|
||||||
|
|
@ -59,6 +60,19 @@ var_dump(Cli\get_window_size());
|
||||||
// 'lines' => string(2) "68"
|
// 'lines' => string(2) "68"
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
Cli\run_command("date", $out);
|
||||||
|
var_dump($out);
|
||||||
|
// string(29) "Mon 6 Apr 17:20:29 AEST 2020"
|
||||||
|
|
||||||
|
try{
|
||||||
|
Cli\run_command("not -a --command", $out, $err);
|
||||||
|
} catch(Cli\Exceptions\RunCommandFailedException $ex) {
|
||||||
|
var_dump($ex->getMessage(), $ex->getCommand(), $ex->getError());
|
||||||
|
}
|
||||||
|
// string(54) "Failed to run command. Returned: sh: 1: not: not found"
|
||||||
|
// string(16) "not -a --command"
|
||||||
|
// string(21) "sh: 1: not: not found"
|
||||||
|
|
||||||
echo Cli\manpage(
|
echo Cli\manpage(
|
||||||
'test',
|
'test',
|
||||||
'1.0.2',
|
'1.0.2',
|
||||||
|
|
@ -128,8 +142,7 @@ Cli\display_error_and_exit('Looks like something went wrong!', 'Fatal Error');
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/pointybeard/helpers-functions-cli/issues),
|
If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/pointybeard/helpers-functions-cli/issues), or better yet, fork the library and submit a pull request.
|
||||||
or better yet, fork the library and submit a pull request.
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue