diff --git a/.gitignore b/.gitignore index 4db060a..e9c6ada 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ cuttlefish +cuttlefish-darwin64/ +*.tar.gz diff --git a/Makefile b/Makefile index 296cf76..a4204ea 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ build: go get go build +clean: + rm cuttlefish + install: cp ./cuttlefish /usr/local/bin/ cp ./functions/__cuttlefish.fish ~/.config/fish/functions/ @@ -21,4 +24,13 @@ uninstall: test: env GOOS=linux GOARCH=amd64 go build -o tests/cuttlefish docker build -t cuttlefish:latest . - docker run --rm -v $(current_dir)/tests/scenarios:/home/nemo/scenarios -w /home/nemo/scenarios cuttlefish:latest run_assertions.fish \ No newline at end of file + docker run --rm -v $(current_dir)/tests/scenarios:/home/nemo/scenarios -w /home/nemo/scenarios cuttlefish:latest run_assertions.fish + +release: clean build + rm -f binaries-darwin64.tar.gz + rm -rf cuttlefish-darwin64 + mkdir cuttlefish-darwin64 + cp cuttlefish cuttlefish-darwin64/ + cp -r functions cuttlefish-darwin64/ + cp Makefile cuttlefish-darwin64/ + tar -cvzf binaries-darwin64.tar.gz cuttlefish-darwin64/ diff --git a/README.md b/README.md index 9f0cddb..f3c649a 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,20 @@ Whenever you visit a directory containing a `.cuttlefish.yaml` file, its configu **Note:** Only subdirectories of the user's home directory are scanned. -## Usage +## Install -### Install +**Note:** The script installs itself in your `~/.config/fish/config.fish`: before doing so, though, it will copy the original file to `~/.config/fish/config.fish_bck` so that it can be restored if needed (see `install` target in `Makefile` for more details). + +### Option 1: Install released binaries + +Grab the binaries from the [releases page](https://github.com/fedragon/cuttlefish/releases), uncompress them and run + +``` +cd cuttlefish-darwin64 +make install +``` + +### Option 2: Build from sources The installation requires Go 1.13+. @@ -28,9 +39,7 @@ cd cuttlefish make ``` -**Note:** The script installs itself in your `~/.config/fish/config.fish`: before doing so, though, it will copy the original file to `~/.config/fish/config.fish_bck` so that it can be restored if needed (see `install` target in `Makefile` for more details). - -### Configure +### Usage Create a `.cuttlefish.yaml` in every directory where you want to load a different environment. The file should look like this: @@ -74,6 +83,12 @@ make build make test ``` +### Release + +``` +make release +``` + ## Credits Cuttlefish logo made by [Freepik](http://www.freepik.com/). \ No newline at end of file