Skip to content
Snippets Groups Projects
Unverified Commit 76261dea authored by Sean Young's avatar Sean Young Committed by GitHub
Browse files

Merge pull request #732 from silasdavis/develop

Add install_db target and dirty hash
parents cecd70d0 ccf09e49
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ SHELL := /bin/bash
REPO := $(shell pwd)
GOFILES_NOVENDOR := $(shell go list -f "{{.Dir}}" ./...)
PACKAGES_NOVENDOR := $(shell go list ./...)
COMMIT := $(shell git rev-parse --short HEAD)
COMMIT := $(shell ./scripts/commit_hash.sh)
# Bosmarmot integration testing
BOSMARMOT_PROJECT := github.com/monax/bosmarmot
BOSMARMOT_GOPATH := ${REPO}/.gopath_bos
......@@ -102,6 +102,10 @@ build_race: check build_race_db build_race_client
build_db:
go build -ldflags "-X github.com/hyperledger/burrow/project.commit=${COMMIT}" -o ${REPO}/bin/burrow ./cmd/burrow
.PHONY: install_db
install_db: build_db
cp ${REPO}/bin/burrow ${GOPATH}/bin/burrow
# build burrow-client
.PHONY: build_client
build_client:
......
#!/usr/bin/env bash
# Gets the git commit hash of the working dir and adds an additional hash of any tracked modified files
commit=$(git describe --tags)
dirty=$(git ls-files -m)
if [[ -n ${dirty} ]]; then
commit="$commit+dirty.$(echo ${dirty} | git hash-object --stdin | head -c8)"
fi
echo "$commit"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment