Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy needed resources to bin dir when run make build #139

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ build: $(BIN)/$(EXECUTABLE)

$(BIN)/$(EXECUTABLE): $(wildcard *.go)
go build -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
cp -r ./templates ./bin/
cp -r ./public ./bin/
cp -r ./conf ./bin/
cp -r ./scripts ./bin/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need the scripts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because scripts got only stuff like init scripts included which is not required for that.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should build this one task simply into the root folder?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tboerger or build on bin and make a symbolic link on root folder. I will test here to see if works.

Copy link
Contributor

@joubertredrat joubertredrat Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tboerger works fine with symbolic link.

dev@devel01:~/public_html/www/gitea-mine$ ln -s bin/gitea .
dev@devel01:~/public_html/www/gitea-mine$ ls -lah gitea
lrwxrwxrwx 1 dev dev 9 Nov 11 08:45 gitea -> bin/gitea
dev@devel01:~/public_html/www/gitea-mine$ ./gitea web
2016/11/11 08:46:43 [T] Custom path: /home/dev/public_html/www/gitea-mine/custom
2016/11/11 08:46:43 [T] Log path: /home/dev/public_html/www/gitea-mine/log
2016/11/11 08:46:43 [I] Gitea: Git with a cup of tea 0.9.99.0915
2016/11/11 08:46:43 [I] Build Time: 2016-11-11 10:45:11 UTC
2016/11/11 08:46:43 [I] Build Git Hash: 85b8b7f
2016/11/11 08:46:43 [I] Log Mode: File(Info)
2016/11/11 08:46:43 [I] Cache Service Enabled
2016/11/11 08:46:43 [I] Session Service Enabled
2016/11/11 08:46:43 [I] Git Version: 1.9.1
2016/11/11 08:46:43 [I] Run Mode: Production
2016/11/11 08:46:43 [T] Doing: CheckRepoStats
2016/11/11 08:46:43 [I] Listen: http://0.0.0.0:3000

.PHONY: release
release: release-build release-copy release-check
Expand Down