-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
814c63e
commit 6303cf2
Showing
2 changed files
with
51 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
# sampctl | ||
|
||
[![Build Status](https://travis-ci.org/Southclaws/sampctl.svg?branch=master)](https://travis-ci.org/Southclaws/sampctl) [![Go Report Card](https://goreportcard.com/badge/github.com/Southclaws/sampctl)](https://goreportcard.com/report/github.com/Southclaws/sampctl) [![https://img.shields.io/badge/Ko--Fi-Buy%20Me%20a%20Coffee-brown.svg](https://img.shields.io/badge/Ko--Fi-Buy%20Me%20a%20Coffee-brown.svg)](https://ko-fi.com/southclaws) | ||
[![Build Status](https://travis-ci.org/Southclaws/sampctl.svg?branch=master)](https://travis-ci.org/Southclaws/sampctl) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/Southclaws/sampctl)](https://goreportcard.com/report/github.com/Southclaws/sampctl) | ||
[![https://img.shields.io/badge/Ko--Fi-Buy%20Me%20a%20Coffee-brown.svg](https://img.shields.io/badge/Ko--Fi-Buy%20Me%20a%20Coffee-brown.svg)](https://ko-fi.com/southclaws) | ||
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSouthclaws%2Fsampctl.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FSouthclaws%2Fsampctl?ref=badge_shield) | ||
|
||
![sampctl-logo](sampctl-wordmark.png) | ||
|
||
The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer. | ||
The Swiss Army Knife of SA:MP - vital tools for any server owner or library | ||
maintainer. | ||
|
||
## Features | ||
|
||
|
@@ -20,7 +24,8 @@ Use on the command-line or integrate with any editor. | |
|
||
![images/sampctl-package-build-vscode.gif](images/sampctl-package-build-vscode.gif) | ||
|
||
Easily write and run tests for libraries or quickly run arbitrary code. Utilise the power of Docker to run on any platform! | ||
Easily write and run tests for libraries or quickly run arbitrary code. Utilise | ||
the power of Docker to run on any platform! | ||
|
||
![images/sampctl-package-run-container.gif](images/sampctl-package-run-container.gif) | ||
|
||
|
@@ -38,13 +43,15 @@ Manage your server settings in JSON or YAML format | |
|
||
### Automatic Server Restart - no more dodgy bash scripts | ||
|
||
Run the server from `sampctl` and let it worry about restarting in case of crashes. | ||
Run the server from `sampctl` and let it worry about restarting in case of | ||
crashes. | ||
|
||
![images/sampctl-server-run.gif](images/sampctl-server-run.gif) | ||
|
||
### Automatic Server and Plugin Installer | ||
|
||
Automatically download Windows/Linux server binaries and plugins when and where you need them. | ||
Automatically download Windows/Linux server binaries and plugins when and where | ||
you need them. | ||
|
||
![images/sampctl-server-ensure.gif](images/sampctl-server-ensure.gif) | ||
|
||
|
@@ -60,33 +67,44 @@ Installation is simple and fast on all platforms so why not give sampctl a try? | |
|
||
Scroll to the end of this document for an overview of the commands. | ||
|
||
Or visit the [wiki](https://github.com/Southclaws/sampctl/wiki) for all the information you need. | ||
Or visit the [wiki](https://github.com/Southclaws/sampctl/wiki) for all the | ||
information you need. | ||
|
||
--- | ||
|
||
## Overview | ||
|
||
sampctl is designed for both development of gamemodes/libraries and management of live servers. | ||
sampctl is designed for both development of gamemodes/libraries and management | ||
of live servers. | ||
|
||
Below is a quick overview of the best features that will help _you_ develop faster. | ||
Below is a quick overview of the best features that will help _you_ develop | ||
faster. | ||
|
||
### Package Management and Build Tool | ||
|
||
If you've used platforms like NodeJS, Python, Go, Ruby, etc you know how useful tools like npm, pip, gem are. | ||
If you've used platforms like NodeJS, Python, Go, Ruby, etc you know how useful | ||
tools like npm, pip, gem are. | ||
|
||
It's about time Pawn had the same tool. | ||
|
||
sampctl provides a simple and intuitive way to _declare_ what includes your project needs. After that you simply let sampctl take care of the downloading and building. | ||
sampctl provides a simple and intuitive way to _declare_ what includes your | ||
project needs. After that you simply let sampctl take care of the downloading | ||
and building. | ||
|
||
If you release scripts, you know it's awkward to test even simple code. You need to set up a server, compile the include into a gamemode, configure the server and run it. | ||
If you release scripts, you know it's awkward to test even simple code. You need | ||
to set up a server, compile the include into a gamemode, configure the server | ||
and run it. | ||
|
||
Forget all that. Just make a [`pawn.json`/`pawn.yaml`](https://github.com/Southclaws/sampctl/wiki/Package-Definition-Reference) in your project directory with `sampctl package init` and use `sampctl package install` to get the includes you need: | ||
Forget all that. Just make a | ||
[`pawn.json`/`pawn.yaml`](https://github.com/Southclaws/sampctl/wiki/Package-Definition-Reference) | ||
in your project directory with `sampctl package init` and use | ||
`sampctl package install` to get the includes you need: | ||
|
||
```json | ||
{ | ||
"entry": "test.pwn", | ||
"output": "test.amx", | ||
"dependencies": ["sampctl/samp-stdlib", "Southclaws/formatex"] | ||
"entry": "test.pwn", | ||
"output": "test.amx", | ||
"dependencies": ["sampctl/samp-stdlib", "Southclaws/formatex"] | ||
} | ||
``` | ||
|
||
|
@@ -138,10 +156,10 @@ Use JSON or YAML to write your server config: | |
|
||
```json | ||
{ | ||
"gamemodes": ["rivershell"], | ||
"plugins": ["maddinat0r/sscanf"], | ||
"rcon_password": "test", | ||
"port": 8080 | ||
"gamemodes": ["rivershell"], | ||
"plugins": ["maddinat0r/sscanf"], | ||
"rcon_password": "test", | ||
"port": 8080 | ||
} | ||
``` | ||
|
||
|
@@ -155,18 +173,20 @@ port 8080 | |
(... and the rest of the settings which have default values) | ||
``` | ||
|
||
What also happens here is `maddinat0r/sscanf` tells sampctl to automatically get the latest sscanf plugin and place the `.so` or `.dll` file into the `plugins/` directory. | ||
What also happens here is `maddinat0r/sscanf` tells sampctl to automatically get | ||
the latest sscanf plugin and place the `.so` or `.dll` file into the `plugins/` | ||
directory. | ||
|
||
[See documentation for more info.](https://github.com/Southclaws/sampctl/wiki/Runtime-Configuration-Reference) | ||
|
||
--- | ||
# `sampctl` | ||
|
||
1.6.11 - Southclaws <[email protected]> | ||
1.7.0 - Southclaws <[email protected]> | ||
|
||
Compiles server configuration JSON to server.cfg format. Executes the server and monitors it for crashes, restarting if necessary. Provides a way to quickly download server binaries of a specified version. Provides dependency management and package build tools for library maintainers and gamemode writers alike. | ||
The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer. | ||
|
||
## Commands (5) | ||
## Commands (6) | ||
|
||
### `sampctl server` | ||
|
||
|
@@ -187,7 +207,6 @@ Bootstrap a new SA:MP server and generates a `samp.json`/`samp.yaml` configurati | |
- `--verbose`: output all detailed information - useful for debugging | ||
- `--version value`: the SA:MP server version to use (default: "0.3.7") | ||
- `--dir value`: working directory for the server - by default, uses the current directory (default: ".") | ||
- `--endpoint value`: endpoint to download packages from (default: "http://files.sa-mp.com") | ||
|
||
### `sampctl server download` | ||
|
||
|
@@ -200,7 +219,6 @@ Downloads the files necessary to run a SA:MP server to the current directory (un | |
- `--verbose`: output all detailed information - useful for debugging | ||
- `--version value`: the SA:MP server version to use (default: "0.3.7") | ||
- `--dir value`: working directory for the server - by default, uses the current directory (default: ".") | ||
- `--endpoint value`: endpoint to download packages from (default: "http://files.sa-mp.com") | ||
|
||
### `sampctl server ensure` | ||
|
||
|
@@ -285,7 +303,7 @@ Clones a GitHub package to either a directory named after the repo or, if the cw | |
|
||
### `sampctl package build` | ||
|
||
Usage: `sampctl package build` | ||
Usage: `sampctl package build [build name]` | ||
|
||
Builds a package defined by a `pawn.json`/`pawn.yaml` file. | ||
|
||
|
@@ -311,7 +329,6 @@ Compiles and runs a package defined by a `pawn.json`/`pawn.yaml` file. | |
- `--verbose`: output all detailed information - useful for debugging | ||
- `--version value`: the SA:MP server version to use (default: "0.3.7") | ||
- `--dir value`: working directory for the server - by default, uses the current directory (default: ".") | ||
- `--endpoint value`: endpoint to download packages from (default: "http://files.sa-mp.com") | ||
- `--container`: starts the server as a Linux container instead of running it in the current directory | ||
- `--mountCache --container`: if --container is set, mounts the local cache directory inside the container | ||
- `--build --forceBuild`: build configuration to use if --forceBuild is set | ||
|
@@ -361,7 +378,6 @@ Builds and runs the specified file in the context of the given template. | |
|
||
- `--verbose`: output all detailed information - useful for debugging | ||
- `--version value`: the SA:MP server version to use (default: "0.3.7") | ||
- `--endpoint value`: endpoint to download packages from (default: "http://files.sa-mp.com") | ||
- `--mode value`: runtime mode, one of: server, main, y_testing (default: "main") | ||
|
||
|
||
|
@@ -374,6 +390,12 @@ Show version number - this is also the version of the container image that will | |
|
||
--- | ||
|
||
### `sampctl completion` | ||
|
||
output bash autocomplete code | ||
|
||
--- | ||
|
||
### `sampctl docs` | ||
|
||
Usage: `sampctl docs > documentation.md` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.6.11 | ||
1.7.0 |