From aa0ba659b3288df8410d76112cb3ebd7ed2a45b2 Mon Sep 17 00:00:00 2001 From: Brett Cleary <27568879+BrettCleary@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:04:03 -0700 Subject: [PATCH 1/2] update readme, fix flags --- README.md | 148 ++++++++++++++++++++++++++++++++++++++++++++++++--- src/flags.ts | 4 +- 2 files changed, 143 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5ea4147..09106c6 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,64 @@ -# @hyperplay/cli +# HyperPlay CLI -## Install +HyperPlay command line interface. -``` + +* [HyperPlay CLI](#hyperplay-cli) +* [Install](#install) +* [Usage](#usage) + * [Flags & Environment Variables](#flags_and_env) + * [YML](#yml) +* [Commands](#commands) + + +# Install + + +```sh-session $ npm install -g @hyperplay/cli $ @hyperplay/cli # OR $ npx @hyperplay/cli ``` + + +# Usage + + +```sh-session +$ hyperplay COMMAND +running command... +$ hyperplay --version +@hyperplay/cli/2.9.1 darwin-arm64 node-v16.13.0 +$ hyperplay --help [COMMAND] +USAGE + $ hyperplay COMMAND +... +``` -## Usage +## Flags & Environment Variables +```bash +$ hyperplay publish [ACCOUNT] [PROJECT] [RELEASE] [--meta-tx] [--network ] [--private-key ] [--web ] + [--darwin_amd64 ] [--darwin_arm64 ] [--windows_amd64 ] [--skip_hyperplay_publish] [--channel ] +``` + +Flags can also be specified with environment variables: +```bash +HYPERPLAY_PRIVATE_KEY=0x123 +HYPERPLAY_NETWORK=polygon +HYPERPLAY_WEB_BUILD=./web +HYPERPLAY_DARWIN_AMD64_BUILD=./darwin/amd64 +HYPERPLAY_DARWIN_ARM64_BUILD=./darwin/arm64 +HYPERPLAY_WINDOWS_ARM64_BUILD=./windows/arm64 +HYPERPLAY_WINDOWS_AMD64_BUILD=./windows/amd64 +HYPERPLAY_LINUX_AMD64_BUILD=./linux/amd64 +HYPERPLAY_LINUX_ARM64_BUILD=./linux/arm64 +HYPERPLAY_ANDROID_AMD64_BUILD=./android/amd64 +HYPERPLAY_SKIP_HYPERPLAY_PUBLISH=false +HYPERPLAY_TARGET_CHANNEL=beta +``` +## YML Create a `hyperplay.yml` in your project folder. ```yml @@ -30,8 +78,94 @@ Run the publish command from the hyperplay cli. Set the publisher private key vi ```bash HYPERPLAY_PRIVATE_KEY=0x1234 hyperplay publish ``` + -or -```bash -HYPERPLAY_PRIVATE_KEY=0x1234 npx @hyperplay/cli publish +# Commands + +* [`hyperplay help [COMMAND]`](#hyperplay-help-command) +* [`hyperplay import`](#hyperplay-import) +* [`hyperplay keygen`](#hyperplay-keygen) +* [`hyperplay publish [PACKAGE] [PATH]`](#hyperplay-publish-package-path) + +## `hyperplay help [COMMAND]` + +Display help for hyperplay. + +``` +USAGE + $ hyperplay help [COMMAND] [-n] + +ARGUMENTS + COMMAND Command to show help for. + +FLAGS + -n, --nested-commands Include all nested commands in the output. + +DESCRIPTION + Display help for hyperplay. +``` + +## `hyperplay import` + +Import an account + +``` +USAGE + $ hyperplay import + +DESCRIPTION + Import an account + +EXAMPLES + $ hyperplay import +``` + +## `hyperplay keygen` + +Generate a new account + +``` +USAGE + $ hyperplay keygen + +DESCRIPTION + Generate a new account + +EXAMPLES + $ hyperplay keygen +``` + +## `hyperplay publish [PACKAGE] [PATH]` + +Publish a release + +``` +USAGE + $ hyperplay publish [ACCOUNT] [PROJECT] [RELEASE] [--meta-tx] [--network ] [--private-key ] [--web ] + [--darwin_amd64 ] [--darwin_arm64 ] [--windows_amd64 ] [--skip_hyperplay_publish] [--channel ] + +ARGUMENTS + ACCOUNT account name + PROJECT project name + RELEASE release name + +FLAGS + --channel= [default: main] Publish build to this release channel on HyperPlay. + --darwin_amd64= Path to darwin amd64 build + --darwin_arm64= Path to darwin arm64 build + --[no-]meta-tx Enable meta transactions + --network= [default: https://rpc.valist.io] Blockchain network + --private-key= Account private key + --[no-]skip_hyperplay_publish Do not publish to HyperPlay. Only Valist. + --web= Path to web build + --windows_amd64= Path to windows amd64 build + +DESCRIPTION + Publish a release + +EXAMPLES + $ hyperplay publish ipfs/go-ipfs/v0.12.3 README.md + + $ hyperplay publish ipfs/go-ipfs/v0.12.3 dist/ ``` + \ No newline at end of file diff --git a/src/flags.ts b/src/flags.ts index ec36dba..989ab05 100644 --- a/src/flags.ts +++ b/src/flags.ts @@ -50,7 +50,7 @@ export const darwin_arm64 = Flags.string({ export const windows_arm64 = Flags.string({ description: 'Path to windows arm64 build', - env: 'HYPERPLAY_WINDOWS_AMD64_BUILD', + env: 'HYPERPLAY_WINDOWS_ARM64_BUILD', default: '' }); @@ -68,7 +68,7 @@ export const linux_amd64 = Flags.string({ export const linux_arm64 = Flags.string({ description: 'Path to linux amd64 build', - env: 'HYPERPLAY_LINUX_AMD64_BUILD', + env: 'HYPERPLAY_LINUX_ARM64_BUILD', default: '' }); From 850feb26d98cbb87d003ab5fcbca14bf20af35e1 Mon Sep 17 00:00:00 2001 From: Brett Cleary <27568879+BrettCleary@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:06:21 -0700 Subject: [PATCH 2/2] bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b82abf..d960338 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hyperplay/cli", - "version": "2.9.1", + "version": "2.9.2", "description": "Hyperplay CLI", "author": "HyperPlay Labs, Inc.", "bin": {