Skip to content

Commit

Permalink
release v0.6.3-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Viart committed Apr 5, 2020
1 parent e83355b commit 651ff2c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 24 deletions.
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,20 @@

PREFIX ?= /usr/local

# dependancies
GOVVV=${GOPATH}/bin/govvv
DOCTOP_LIB=${GOPATH}/src/github.com/docopt/docopt-go/docopt.go

# keep docopts: as first target for development

# govvv define main.Version with the contents of ./VERSION file, if exists
BUILD_FLAGS=$(shell ./get_ldflags.sh)
docopts: docopts.go Makefile ${GOVVV} ${DOCTOP_LIB}
docopts: docopts.go Makefile
go build -o $@ -ldflags "${BUILD_FLAGS} ${LDFLAGS}"

install_builddep: ${GOVVV} ${DOCTOP_LIB}
# dependancies
install_builddep:
go get github.com/docopt/docopts
go get github.com/docopt/docopt-go
go get github.com/mitchellh/gox
go get github.com/itchio/gothub
go get gopkg.in/mikefarah/yq.v2

${DOCTOP_LIB}:
go get github.com/docopt/docopt-go

${GOVVV}:
go get gopkg.in/yaml.v2
go get github.com/ahmetb/govvv

all: install_builddep docopts README.md
Expand Down
4 changes: 2 additions & 2 deletions build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ find_end_content() {
local start_line=$1
local input=$2
# find closing ``` : first matching ``` after $start_line
awk "NR > $start_line && /^\`{3}/ {print NR; exit}" $input
gawk "NR > $start_line && /^\`{3}/ {print NR; exit}" $input
}

eval_wrapper() {
Expand Down Expand Up @@ -186,7 +186,7 @@ get_usage() {
# extract docopts version
get_version() {
local text="$1"
local version=$(awk 'NR == 1 { print $2 }')
local version=$(gawk 'NR == 1 { print $2 }')
echo "$text $version"
}

Expand Down
3 changes: 2 additions & 1 deletion deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ releases:
- `docopts.sh` function `docopt_get_help_string()` now uses awk to extract only first `Usage:`
internal changes:
- use Go 1.14 for compiling
- more pre-built binaries, removed darwin/386
- fixed #44 `get_docopts.sh` for MACOS + functionnal tests
- removed bats git submodule
- use [bats-core 1.2-dev](https://github.com/bats-core/bats-core) as testing framework from travis
- `deploy.sh` removed, now use its [own repository](https://github.com/opensource-expert/deploy.sh)
- updaed Makefile to use `get_ldflags.sh` from `deploy.sh`
- updated Makefile to use `get_ldflags.sh` from `deploy.sh`
- [travis hack](travis/get_bash5_macos.sh) to get faster build on macos with our embedded bash5 binary
v0.6.3-rc1:
Expand Down
20 changes: 11 additions & 9 deletions docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ All python related stuff has been removed, excepted `language_agnostic_tester.py

## Hacking docopts

If you want to clone this repository and hack `docopts`:
In order to hack `docopts` you will need:

You will need to install [`bats-core`](https://github.com/bats-core/bats-core) in your PATH.
These are only required for testing with `bats`, you may omit it if you dont plan to use
`make test`
- A working [Go developper environment](https://golang.org/doc/code.html#Organization)
- [`bats-core`](https://github.com/bats-core/bats-core) in your PATH. (optional: for testing with `make test`)
- GNU awk (for `build_doc.sh`)

Fetch the extra golang version of `docopt-go` (required for building `docopts`)
Fetch all dependancies:

```
go get github.com/docopt/docopt-go
make install_builddep
```

Current folder structure looks like:
## Current folder structure

It should looks like:

```
.
Expand Down Expand Up @@ -77,13 +79,13 @@ python language_agnostic_tester.py ./testee.sh
This lib is outside this project, but it is the base of the `docopt` language parsing for this wrapper.

```
cd PATH/to/go/src/github.com/docopt/docopt-go/
cd $GOPATH/src/github.com/docopt/docopt-go
go test -v .
```

#### golang docopts (our bash wrapper)

```
cd PATH/to/go/src/github.com/docopt/docopts
cd $GOPATH/src/github.com/docopt/docopts
go test -v
```

0 comments on commit 651ff2c

Please sign in to comment.