diff --git a/.acceptance_tests/Vagrantfile b/.acceptance_tests/Vagrantfile index dfe71b2..72deb27 100644 --- a/.acceptance_tests/Vagrantfile +++ b/.acceptance_tests/Vagrantfile @@ -19,7 +19,7 @@ Vagrant.configure(2) do |config| sudo apt-get install -y curl git language-pack-en if [ ! -d /usr/local/go ]; then - curl -sSL https://dl.google.com/go/go1.12.4.linux-amd64.tar.gz \ + curl -sSL https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz \ | tar -C /usr/local -xzf - fi diff --git a/.acceptance_tests/acceptance-tests.sh b/.acceptance_tests/acceptance-tests.sh index ef1508d..f467fdf 100755 --- a/.acceptance_tests/acceptance-tests.sh +++ b/.acceptance_tests/acceptance-tests.sh @@ -57,7 +57,7 @@ function run() { cd /home/vagrant/.go/src/github.com/docker-exec/dexec go get go install - bats /bats/dexec.bats" + bats .acceptance_tests/bats/dexec.bats" down popd >/dev/null } diff --git a/.acceptance_tests/bats/fixtures/go/helloworld.go b/.acceptance_tests/bats/fixtures/go/helloworld.go index 4d87e21..d22626e 100644 --- a/.acceptance_tests/bats/fixtures/go/helloworld.go +++ b/.acceptance_tests/bats/fixtures/go/helloworld.go @@ -3,5 +3,5 @@ package main import "fmt" func main() { - fmt.Printf("%s\n", "hello world") + fmt.Printf("%s\n", "hello world") } diff --git a/.gitignore b/.gitignore index 45e316a..f9ac9a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .goxc.local.json .acceptance_tests/.vagrant .acceptance_tests/*.log -.vscode/.* +build diff --git a/.goxc.json b/.goxc.json index ddc7300..de8e59c 100644 --- a/.goxc.json +++ b/.goxc.json @@ -1,6 +1,6 @@ { "BuildConstraints": "windows,linux,darwin", - "PackageVersion": "1.0.7", + "PackageVersion": "1.0.8", "TaskSettings": { "bintray": { "downloadspage": "bintray.md", diff --git a/.script/release.sh b/.script/release.sh new file mode 100755 index 0000000..037b254 --- /dev/null +++ b/.script/release.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +app_name=dexec +release_version=1.0.8 +build_path=$(pwd -P)/build + +rm -rf ${build_path} +mkdir ${build_path} +gox -output="${build_path}/${app_name}_${release_version}_{{.OS}}_{{.Arch}}/${app_name}" -os='linux windows darwin' -arch='386 amd64' +for bin_path in $(find -E ${build_path} -type d -depth 1 | perl -pe "s|^${build_path}\/||"); do + target_file=$(perl -pe 's/^(.*)\.[^\.]$/$1/' <<<${bin_path}) + target_os=$(perl -pe 's/^\w+_[\d\.]+_(\w+)_\w+$/$1/' <<<${bin_path}) + target_arch=$(perl -pe 's/^\w+_[\d\.]+_\w+_(\w+)$/$1/' <<<${bin_path}) + case ${target_os} in + windows) + pushd ${build_path}/${bin_path} >/dev/null + zip -9 -q ${build_path}/${target_file}.zip ${app_name}.exe + popd >/dev/null + rm -rf ${build_path}/${bin_path} + ;; + *) + tar -czf ${build_path}/${target_file}.tar.gz -C ${build_path}/${bin_path} ${app_name} && rm -rf ${build_path}/${bin_path} + ;; + esac +done diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b47b01..b0a635a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,16 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased][unreleased] + +## [1.0.8] - 2019-06-23 ### Added +- Timeout command line option that causes dexec to exit early if its value is exceeded. - Destroy option in acceptance test script. - Github Actions support. ### Fixed -- Fixed Stdin example in Readme.md. +- Streaming IO from container. +- Stdin example in Readme.md. ### Changed - Migrate to Go Modules for dependency management. @@ -17,6 +21,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Removed .vscode dir. - Renamed .test dir to acceptance_tests - Updated years in LICENSE. +- Migrate away from goxc to gox with custom scripts. ### Removed - Removed redundant stdin reading code. @@ -93,7 +98,12 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Help dialog. - Version dialog. -[unreleased]: https://github.com/docker-exec/dexec/compare/v1.0.3...HEAD +[unreleased]: https://github.com/docker-exec/dexec/compare/v1.0.8...HEAD +[1.0.8]: https://github.com/docker-exec/dexec/compare/v1.0.7...v1.0.8 +[1.0.7]: https://github.com/docker-exec/dexec/compare/v1.0.6...v1.0.7 +[1.0.6]: https://github.com/docker-exec/dexec/compare/v1.0.5...v1.0.6 +[1.0.5]: https://github.com/docker-exec/dexec/compare/v1.0.4...v1.0.5 +[1.0.4]: https://github.com/docker-exec/dexec/compare/v1.0.3...v1.0.4 [1.0.3]: https://github.com/docker-exec/dexec/compare/v1.0.2...v1.0.3 [1.0.2]: https://github.com/docker-exec/dexec/compare/v1.0.1...v1.0.2 [1.0.1]: https://github.com/docker-exec/dexec/compare/v1.0.0...v1.0.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 860058b..6857fe9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,11 +46,11 @@ Vagrant's VirtualBox provider is used to spin up an Ubuntu VM on which Docker is Run the following command from the path that you checked out dexec to run the acceptance tests: ```sh -acceptance_tests/acceptance_tests.sh run +acceptance_tests/acceptance-tests.sh run ``` By default, the vagrant box will be restored to its initial state at the start of every run. This guarantees sandboxing of the application and images, but means that all the images will be redownloaded every time you run the tests. This may not be desirable during development as it takes several minutes to download the images. To avoid this you can add the ```--no-clean``` option to reuse images that have already been downloaded to the VM: ```sh -acceptance_tests/acceptance_tests.sh run --no-clean +acceptance_tests/acceptance-tests.sh run --no-clean ``` diff --git a/Makefile b/Makefile index da8d419..44c0106 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ -.PHONY : all test +.PHONY : all test release all: | test test: @go test + +release: + @.script/release.sh diff --git a/cli.go b/cli.go index 990f27b..d628386 100644 --- a/cli.go +++ b/cli.go @@ -187,5 +187,5 @@ func DisplayHelp(filename string) { // DisplayVersion prints the version information for the program. func DisplayVersion(filename string) { - fmt.Printf("%s 1.0.9-SNAPSHOT\n", filename) + fmt.Printf("%s 1.0.8\n", filename) }