-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(tools): swap out Rakefile for Makefile
simplify things for people who don't want to think about Ruby, and hopefully in the future when we remove it entirely as a dependency for the integration tests.
- Loading branch information
Showing
4 changed files
with
37 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
## Development | ||
|
||
While the build process itself does not require it, development uses Ruby for | ||
integration testing because of the excellent Cucumber/Aruba package for testing | ||
CLI tools. | ||
While the build process itself does not require it, development currently uses | ||
Ruby for integration testing because of the excellent Cucumber/Aruba package for | ||
testing CLI tools. | ||
|
||
Thus, to run integration tests, you will need to have Ruby and bundler installed | ||
on your system. Do `bundle install` to get the test environment going. | ||
|
||
Since we already have Ruby then for tests, we use a Rakefile instead of Makefile | ||
since it offers some niceties. Do `rake -T` to see available tasks. | ||
|
||
If you don't have a local Ruby environment, there is a VSCode .devcontainer | ||
provided to make things simpler. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# build the binary | ||
# note starting in go1.18 vcs information will be available via go version -m | ||
build: | ||
@VERSION=$$(git describe --tags HEAD 2>/dev/null || echo unknown); \ | ||
echo "Building as version: $$VERSION" | ||
go build -o bin/scmpuff -mod=readonly -ldflags "-X main.VERSION=$$VERSION" | ||
|
||
# run unit tests | ||
test: | ||
go test ./... | ||
|
||
# run integration tests (not including work in progress features) | ||
features: build | ||
bundle exec cucumber -s --tags='not @wip' | ||
|
||
# run integration tests (work in progress features only) | ||
features-wip: build | ||
bundle exec cucumber -s --tags=@wip | ||
|
||
# package as if for distribution | ||
package: | ||
goreleaser release --clean --skip publish,homebrew | ||
|
||
# clean temp files (aruba tmp directory) | ||
clean: | ||
rm -rf ./tmp | ||
|
||
# remove all build artifacts | ||
clobber: | ||
rm -rf ./dist | ||
rm -f bin/scmpuff | ||
|
||
.PHONY: build install test features features-wip package clean clobber |