1
0
mirror of https://github.com/minio/mc.git synced 2025-11-14 23:42:27 +03:00
Files
mc/buildscripts/git-commit-id.sh
Harshavardhana 45d32b6238 Add extra information into mc with --debug
~~~
MEM:
   Used: 143.48 KB | Allocated: 192.23 KB | Used-Heap: 143.48 KB | Allocated-Heap: 816.00 KB

PLATFORM:
   Host: command | OS: linux | Arch: amd64

RUNTIME:
   Version: go1.4 | CPUs: 4
~~~
2015-04-01 22:25:19 -07:00

19 lines
325 B
Bash

#!/usr/bin/env bash
CONST_FILE=build-constants.go
cat > $CONST_FILE <<EOF
/*
* ** DO NOT EDIT THIS FILE. THIS FILE IS AUTO GENERATED BY RUNNING MAKE **
*/
package main
const (
mcGitCommitHash = "__GIT_COMMIT_HASH__"
)
EOF
commit_id=$(git log --format="%H" -n 1)
sed -i "s/__GIT_COMMIT_HASH__/$commit_id/" $CONST_FILE