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
def context(*args, &block) | |
return super unless (name = args.first) && block | |
require 'test/unit' | |
klass = Class.new(Test::Unit::TestCase) do | |
def self.test(name, &block) | |
define_method("test_#{name.gsub(/\W/, '_')}", &block) if block | |
end | |
def self.xtest(*args) | |
end | |
def self.setup(&block) |
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
REV_VAR := main.RevString | |
VERSION_VAR := main.VersionString | |
REPO_VERSION := $(shell git describe --always --dirty --tags) | |
REPO_REV := $(shell git rev-parse --sq HEAD) | |
GOBUILD_VERSION_ARGS := -ldflags "-X $(REV_VAR) $(REPO_REV) -X $(VERSION_VAR) $(REPO_VERSION)" | |
build: | |
go build -x $(GOBUILD_VERSION_ARGS) -o version-trick . |