Add WSL friendly check-go-version setup (#443)

* Add WSL friendly check-go-version setup

* Add changelog entry and update my username

* Add PR link to changelog

* Stop it saying 'noting to be done for check-go-version'

* Update CHANGELOG.md

Co-authored-by: Viacheslav Poturaev <vearutop@gmail.com>

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Viacheslav Poturaev <vearutop@gmail.com>
Этот коммит содержится в:
Gemini Smith 2021-12-01 08:22:04 -07:00 коммит произвёл GitHub
родитель df294698f5
коммит 82bcce7bdc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 16 добавлений и 8 удалений

Просмотреть файл

@ -8,6 +8,12 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
---
## [Unreleased]
### Fixed
- `check-go-version` in Makefile to run on WSL. ([443](https://github.com/cucumber/godog/pull/443) - [mxygem])
## [v0.12.2]
### Fixed
@ -146,8 +152,8 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
### Changed
- Run godog features in CircleCI in strict mode ([jaysonesmith])
- Removed TestMain call in `suite_test.go` for CI. ([jaysonesmith])
- Run godog features in CircleCI in strict mode ([mxygem])
- Removed TestMain call in `suite_test.go` for CI. ([mxygem])
- Migrated to [gherkin-go - v11.0.0](https://github.com/cucumber/gherkin-go/releases/tag/v11.0.0). ([240](https://github.com/cucumber/godog/pull/240) - [lonnblad])
### Deprecated
@ -158,7 +164,7 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
- Fixed the time attributes in the JUnit formatter. ([232](https://github.com/cucumber/godog/pull/232) - [lonnblad])
- Re enable custom formatters. ([238](https://github.com/cucumber/godog/pull/238) - [ericmcbride])
- Added back suite_test.go ([jaysonesmith])
- Added back suite_test.go ([mxygem])
- Normalise module paths for use on Windows ([242](https://github.com/cucumber/godog/pull/242) - [gjtaylor])
- Fixed panic in indenting function `s` ([247](https://github.com/cucumber/godog/pull/247) - [titouanfreville])
- Fixed wrong version in API example ([263](https://github.com/cucumber/godog/pull/263) - [denis-trofimov])
@ -181,18 +187,18 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
### Fixed
- Find/Replaced references to DATA-DOG/godog -> cucumber/godog for docs. ([209](https://github.com/cucumber/godog/pull/209) - [smikulcik])
- Fixed missing links in changelog to be correctly included! ([jaysonesmith])
- Fixed missing links in changelog to be correctly included! ([mxygem])
## [0.8.0]
### Added
- Added initial CircleCI config. ([jaysonesmith])
- Added initial CircleCI config. ([mxygem])
- Added concurrency support for JUnit formatting ([lonnblad])
### Changed
- Changed code references to DATA-DOG/godog to cucumber/godog to help get things building correctly. ([jaysonesmith])
- Changed code references to DATA-DOG/godog to cucumber/godog to help get things building correctly. ([mxygem])
### Deprecated
@ -214,7 +220,7 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
<!-- Contributors -->
[axw]: https://github.com/axw
[jaysonesmith]: https://github.com/jaysonesmith
[mxygem]: https://github.com/mxygem
[lonnblad]: https://github.com/lonnblad
[smikulcik]: https://github.com/smikulcik
[ericmcbride]: https://github.com/ericmcbride

Просмотреть файл

@ -2,9 +2,11 @@
VERS := $(shell grep 'const Version' -m 1 godog.go | awk -F\" '{print $$2}')
FOUND_GO_VERSION := $(shell go version)
EXPECTED_GO_VERSION = 1.17
.PHONY: check-go-version
check-go-version:
@[[ "$(shell go version)" =~ $(EXPECTED_GO_VERSION) ]] || (echo Wrong go version! Please install $(EXPECTED_GO_VERSION) && exit 1)
@$(if $(findstring ${EXPECTED_GO_VERSION}, ${FOUND_GO_VERSION}),(exit 0),(echo Wrong go version! Please install ${EXPECTED_GO_VERSION}; exit 1))
test: check-go-version
@echo "running all tests"