Skip to content

Commit

Permalink
Create releases via Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
fedragon committed Oct 23, 2020
1 parent 4a6910f commit 5c19f88
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cuttlefish
cuttlefish-darwin64/
*.tar.gz
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
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/
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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+.

Expand All @@ -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:

Expand Down Expand Up @@ -74,6 +83,12 @@ make build
make test
```

### Release

```
make release
```

## Credits

Cuttlefish logo made by [Freepik](http://www.freepik.com/).

0 comments on commit 5c19f88

Please sign in to comment.