diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7a623f..46604d12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## 0.1.2 - 2023-04-26 + +### Fixed + +- Set correct file permission flags when making the forklift workspace if it doesn't already exist + ## 0.1.1 - 2023-04-26 ### Added diff --git a/README.md b/README.md index 8f205e5c..ba396d59 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,28 @@ This repository provides `forklift`, a Git-based command-line tool for installin ## Usage -First, you will need to clone a Pallet environment to your local environment. For example, you can clone the latest unstable version (on the `edge` branch) of the [`github.com/PlanktoScope/pallets-env`](https://github.com/PlanktoScope/pallets-env) environment using the command: +First, you will need to download forklift, which is available as a single self-contained executable file. You should visit this repository's [releases page](https://github.com/PlanktoScope/forklift/releases/latest) and download an archive file for your platform and CPU architecture; for example, on a Raspberry Pi 4, you should download the archive named `forklift_{version number}_linux_arm.tar.gz` (where the version number should be substituted). You can extract the forklift binary from the archive using a command like: +``` +tar -xzf forklift_{version number}_{os}_{cpu architecture}.tar.gz forklift +``` + +Then you may need to move the forklift binary into a directory in your system path, or you can just run the forklift binary in your current directory (in which case you should replace `forklift` with `./forklift` in the commands listed below). + +Once you have forklift, you will need to clone a Pallet environment to your local environment. For example, you can clone the latest unstable version (on the `edge` branch) of the [`github.com/PlanktoScope/pallets-env`](https://github.com/PlanktoScope/pallets-env) environment using the command: ``` forklift env clone github.com/PlanktoScope/pallets-env@edge ``` -Then you will need to download the Pallet repositories specified by your local environment into your local cache, so that you can deploy packages provided by those repositories. You can do download the necessary repositories using the command: +Then you will need to download the Pallet repositories specified by your local environment into your local cache, so that you can deploy packages provided by those repositories. You can download the necessary repositories using the command: ``` forklift env cache ``` +Then you will need to apply the package deployments as configured by your local environment, into your Docker Swarm. You can apply the deployments using the command: +``` +forklift env deploy +``` + ## Licensing Except where otherwise indicated, source code provided here is covered by the following information: diff --git a/cmd/forklift/main.go b/cmd/forklift/main.go index f8aabe41..a6afbc51 100644 --- a/cmd/forklift/main.go +++ b/cmd/forklift/main.go @@ -17,8 +17,10 @@ func main() { var defaultWorkspaceBase, _ = os.UserHomeDir() var app = &cli.App{ - Name: "forklift", - Version: "v0.1.0", + Name: "forklift", + // TODO: see if there's a way to get the version from a build tag, so that we don't have to update + // this manually + Version: "v0.1.2", Usage: "Manages Pallet repositories and package deployments", Commands: []*cli.Command{ envCmd, diff --git a/internal/app/forklift/workspace/workspace.go b/internal/app/forklift/workspace/workspace.go index eb4c210f..6320b462 100644 --- a/internal/app/forklift/workspace/workspace.go +++ b/internal/app/forklift/workspace/workspace.go @@ -16,7 +16,7 @@ func Exists(path string) bool { } func EnsureExists(path string) error { - const perm = 755 // owner rwx, group rx, public rx + const perm = 0o755 // owner rwx, group rx, public rx return os.MkdirAll(path, perm) }