mirror of
https://github.com/minio/mc.git
synced 2025-11-14 23:42:27 +03:00
35 lines
909 B
Bash
Executable File
35 lines
909 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Mini Copy (C) 2015 Minio, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
|
|
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
|