revel / cmd

Command line tools for Revel.
MIT License
62 stars 101 forks source link

Add exclude .go sources option #49

Closed mageddo closed 6 years ago

mageddo commented 8 years ago

Based on this discursion

As a revel packager I want to exclude .go files from the zipped file generated by revel package command Because Is not wanted for me share my source files with the final user

A example, the chat sample. When I run

$ revel build github.com/revel/samples/chat /tmp/chat-build prod # or revel package

It generates the follow tree. This way my source code is exposed to the final user, I want that all files be compiled to the binary and no one source file be exposed.

.
├── chat
├── run.bat
├── run.sh
└── src
    └── github.com
        └── revel
            ├── modules
            │   ├── static
            │   │   └── app
            │   │       └── controllers
            │   │           └── static.go
            │   └── testrunner
            │       ├── app
            │       │   ├── controllers
            │       │   │   └── testrunner.go
            │       │   ├── plugin.go
            │       │   └── views
            │       │       └── TestRunner
            │       │           ├── FailureDetail.html
            │       │           ├── Index.html
            │       │           └── SuiteResult.html
            │       ├── conf
            │       │   └── routes
            │       └── public
            │           ├── css
            │           │   ├── bootstrap.min.css
            │           │   └── github.css
            │           ├── images
            │           │   └── favicon.png
            │           └── js
            │               ├── bootstrap.min.js
            │               ├── highlight.pack.js
            │               └── jquery-1.9.1.min.js
            ├── revel
            │   ├── conf
            │   │   └── mime-types.conf
            │   └── templates
            │       └── errors
            │           ├── 403.html
            │           ├── 403.json
            │           ├── 403.txt
            │           ├── 403.xml
            │           ├── 404-dev.html
            │           ├── 404.html
            │           ├── 404.json
            │           ├── 404.txt
            │           ├── 404.xml
            │           ├── 405.html
            │           ├── 405.json
            │           ├── 405.txt
            │           ├── 405.xml
            │           ├── 500-dev.html
            │           ├── 500.html
            │           ├── 500.json
            │           ├── 500.txt
            │           └── 500.xml
            └── samples
                └── chat
                    ├── app
                    │   ├── chatroom
                    │   │   └── chatroom.go
                    │   ├── controllers
                    │   │   ├── app.go
                    │   │   ├── longpolling.go
                    │   │   ├── refresh.go
                    │   │   └── websocket.go
                    │   ├── routes
                    │   │   └── routes.go
                    │   ├── tmp
                    │   │   └── main.go
                    │   └── views
                    │       ├── Application
                    │       │   └── Index.html
                    │       ├── footer.html
                    │       ├── header.html
                    │       ├── LongPolling
                    │       │   └── Room.html
                    │       ├── Refresh
                    │       │   └── Room.html
                    │       └── WebSocket
                    │           └── Room.html
                    ├── conf
                    │   ├── app.conf
                    │   └── routes
                    ├── public
                    │   ├── images
                    │   │   └── favicon.png
                    │   ├── javascripts
                    │   │   ├── jquery-1.5.min.js
                    │   │   ├── jquery.scrollTo-min.js
                    │   │   └── templating.js
                    │   └── stylesheets
                    │       └── main.css
                    └── tests
                        └── apptest.go
jeevatkm commented 8 years ago

Thanks for creating an issue. It is scheduled for v0.14

notzippy commented 7 years ago

Looking at https://github.com/src-d/go-billy to provide an abstraction layer so build can be generated to a single file and strip out any uneeded files along the way see also pr #44

notzippy commented 6 years ago

By default build and package exclude go sources