diff --git a/Changelog.md b/Changelog.md index a00fc93..9433705 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,113 @@ -# Change history +# Changelog -See the [GitHub Releases](https://github.com/docopt/docopts/releases). +## bug fix v0.6.4-with-no-mangle-double-dash + +Tag: `v0.6.4-with-no-mangle-double-dash` + +This is a bug fix release. + +features changes: + - fix error refusing mangling double dash in global mode [#52] + - still refuse to mangle single dash `[-]` in global mode (not compatible with v0.6.1) + - now can mangle single-dash and double-dash in `-G` mode + - fix output bash empty array #53 + +internal changes: + - use Go 1.17.1 for compiling + - `language_agnostic_tester.py` re-write for python3 + - sort argument key in `Print_bash_args()` `Print_bash_global()` + - sort input keys in `docopts_test.go` + - add PR #52 test to `testcases.docopt` + - completed developer documentation + - #52 ignore `[--]` double-dash option in `Print_bash_global()` + - reformat of Go code with `gofmt`; indent change Space ==> Tab + - add `tests/functional_tests_docopts.bats` + +## docopts binary transitional v0.6.3-rc2 + +Tag: `v0.6.3-rc2` + +This is a transitional release. + +It supports all the previous command line API plus some extra options. +Fully compatible with previous 0.6.2 python code for Bash. + +See: https://github.com/docopt/docopts/tree/v0.6.1%2Bfix +based on master branch + +features changes: + - `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 + functional 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 uses its [own repository](https://github.com/opensource-expert/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 + +## docopts binary transitional v0.6.3-rc1 + +Tag: `v0.6.3-rc1` + +This is a transitional release. + +It supports all the previous API plus some extra command line options. +Fully compatible with previous 0.6.2 Python code for Bash. + +See: https://github.com/docopt/docopts/tree/v0.6.1%2Bfix +based on master branch + +changes: + - more test for macOS + - Bash 3.2 support is more documented and fixed + - use `bats-core` as testing framework + - updated README merged from old README.rst + - now documentation introduce `docopts.sh` See [docs](https://github.com/docopt/docopts/tree/v0.6.3-rc1/docs/) + - added `Makefile` + - added `build_doc.sh` PoC markdown preprocessor + +all examples written for docopts: + - shebang conversion `#!/bin/bash` ==> `#!/usr/bin/env bash` + - legacy example completed + - example from README extracted a file, and merged in README via `build_doc.sh` + - `sshdiff` full example coded + - added examples with `--auto -G` + +docopts.sh helper: + - is more documented in the code + - has documenation in [docs/README.md](https://github.com/docopt/docopts/tree/v0.6.3-rc1/docs/README.md) + - now supports bash strict mode (`set -euo pipefail`) + - now supports `--auto -G` to auto parse with global vars (doesn't use bash 4 associative array) +`docopts` behavior sould be unchanged: + - add mangled name collision detection + +## docopts for Bash first release in golang + +Tag: `v0.6.3-alpha1` + +This is a transitional release. + +It is a complete rewrite of the Python code in Go. +It supports all of the previous API plus some extra command line options. + +Fully compatible with previous 0.6.2 python code for Bash. +based on https://github.com/docopt/docopts/tree/packaging-debian + +## first release in Go + +Tag: `v0.6.2` + +This is a transitional release. + +Docopt for shell. +It supports all of the previous API. + +Fully compatible with previous 0.6.1 Python code for Bash. +See: https://github.com/docopt/docopts/tree/v0.6.1%2Bfix +based on master branch + +changes: + - now written in Go, no more Python dependency diff --git a/Makefile b/Makefile index 7b84269..8cacfec 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PREFIX ?= /usr/local GOVERSION := $$(go version) +RELEASE_NOTES := $$(awk -v RS='\#\# *|\#\# ' 'NR==2 { print }' CHANGELOG.md) # keep docopts: as first target for development @@ -35,8 +36,11 @@ README.md: examples/legacy_bash/rock_hello_world.sh examples/legacy_bash/rock_he clean: rm -f docopts-* docopts README.tmp dist/* +test_release_notes: + echo "\n## $(RELEASE_NOTES)" + snapshot: install_builddep GOVERSION=$(GOVERSION) goreleaser build --rm-dist --snapshot -o docopts release: clean all test snapshot - GOVERSION=$(GOVERSION) goreleaser release + GOVERSION=$(GOVERSION) goreleaser release --release-notes "## $(RELEASE_NOTES)" diff --git a/docs/pre_built_binaries.md b/docs/pre_built_binaries.md index e1b86a7..d55a100 100644 --- a/docs/pre_built_binaries.md +++ b/docs/pre_built_binaries.md @@ -70,7 +70,7 @@ git push origin "$(cat VERSION)" In `docopts` project folder. -You need to create the release text in `deployment.yml` first. +You need to create the release text in `CHANGELOG.md` first. Dry-run to create release files and binaries in the `dist/` dir: diff --git a/docs/release.md b/docs/release.md index 462dba8..216e296 100644 --- a/docs/release.md +++ b/docs/release.md @@ -15,9 +15,8 @@ git add ./tests/VERSION Increment the `./VERSION` number -edit `./deployment.yml` - -- add the new tag name release matching ./VERSION +edit `CHANGELOG.md`: +- add a new heading at the top of the file with `## ` (only the first `##` will be used) - the description you want, changes etc. ## 2. rebuild all @@ -82,7 +81,7 @@ git tag ## 9. build the release -The following will build all binary version from `deployment.yml` +The following will build all binary version from `.goreleaser.yml` ``` make snapshot