elimintate .git/objects from build context

This commit is contained in:
Umputun
2018-06-10 20:29:31 -05:00
parent 5102186ad6
commit 6cce01390c
3 changed files with 5 additions and 2 deletions
+1
View File
@@ -5,6 +5,7 @@
/web/public/
/.vscode/
/.idea/
/.git/objects/
# source files
docker-compose.yml
+1 -1
View File
@@ -32,7 +32,7 @@ RUN if [ -z "$COVERALLS_TOKEN" ] ; then \
else goveralls -coverprofile=.cover/cover.out -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
RUN \
version=$(git rev-parse --abbrev-ref HEAD)-$(git describe --abbrev=7 --always --tags)-$(date +%Y%m%d-%H:%M:%S) && \
version=$(/script/git-rev.sh) && \
echo "version $version" && \
go build -o remark -ldflags "-X main.revision=${version} -s -w" ./app
+3 -1
View File
@@ -85,8 +85,11 @@ func main() {
if _, e := p.ParseArgs(os.Args[1:]); e != nil {
os.Exit(1)
}
setupLog(opts.Dbg)
log.Print("[INFO] started remark")
resetEnv("SECRET", "AUTH_GOOGLE_CSEC", "AUTH_GITHUB_CSEC", "AUTH_FACEBOOK_CSEC", "AUTH_YANDEX_CSEC")
ctx, cancel := context.WithCancel(context.Background())
go func() { // catch signal and invoke graceful termination
stop := make(chan os.Signal, 1)
@@ -107,7 +110,6 @@ func main() {
// New prepares application and return it with all active parts
// doesn't start anything
func New(opts Opts) (*Application, error) {
setupLog(opts.Dbg)
if err := makeDirs(opts.BoltPath, opts.BackupLocation, opts.AvatarStore); err != nil {
return nil, err