Skip to content

The command-line companion for worthy developers at Toward. 🤖

Notifications You must be signed in to change notification settings

towardstudio/toward-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


The command-line companion for worthy developers at Toward. 🤖

Open Source Disclaimer

Getting Started

Homebrew

Installation of this tool as a Formula using Homebrew is strongly recommended.

brew install towardstudio/toward/toward-cli

Usage

To get started, run the following.

toward --help

Updating

You can update the Formula using Homebrew.

brew upgrade toward-cli

Then confirm you're running the desired version.

toward --version

Example Toward File

# The Docker container's name
DOCKER_CONTAINER=

# The Assets file path
ASSET_PATH=web/assets

# Details and credentials for the project's staging server
STAGING_SERVER_IP=
STAGING_SERVER_ADDRESS=
STAGING_SERVER_USERNAME=
STAGING_SITE_DIRECTORY=
STAGING_DATABASE_NAME=
STAGING_DATABASE_USERNAME=
STAGING_DATABASE_PASSWORD=

# Details and credentials for the project's production server
PRODUCTION_SERVER_IP=
PRODUCTION_SERVER_ADDRESS=
PRODUCTION_SERVER_USERNAME=
PRODUCTION_SITE_DIRECTORY=
PRODUCTION_DATABASE_NAME=
PRODUCTION_DATABASE_USERNAME=
PRODUCTION_DATABASE_PASSWORD=

For Developers

Requirements

Install Deno.

brew install deno

Alternative installation instructions.

Making changes

  1. Clone this repository.
git clone [email protected]:towardstudio/toward-cli.git toward-cli
  1. Before committing any changes, always run Deno's built-in linter at the project's root, and resolve any issues.
deno lint
  1. Before committing any changes, always run Deno's built-in formatter at the project's root.
deno fmt
  1. When everything is ready for release, update the version value in /src/version.ts.

  2. Compile the code into a self-contained executable named toward at the project's root.

deno compile --allow-read --allow-write --allow-run --allow-env --output toward main.ts
  1. You can test your local changes by creating an alias:
alias towardcli="deno run --allow-read --allow-write --allow-run --allow-env <path to main.ts>"
  1. You then can run that within any project with subcommands to make sure your updates work:
towardcli assets pull -e staging
  1. Once all changes are committed, create a Tag and Release in GitHub. Both should follow the standard SemVer naming convention, E.G. v1.2.3. Use detailed release descriptions, following by the example of earlier releases.

  2. Underneath the release notes, attach the previously generated toward binary.

  3. Open the Release's Assets, and make a note of the toward binary's URL. This will be needed when updating the Tap.

  4. Finish-up by updating Toward's Homebrew Tap. Head to the repository for detailed instructions.