V
V
Viktor2019-06-01 14:42:23
git
Viktor, 2019-06-01 14:42:23

How to make a production build without sources within one repository?

I broke my head - I can’t figure out how to organize the assembly and deployment of the project (now I use gitlab ci) in such a way that the sources do not get into the master branch, which is bottled for production, but only compiled and minified js / css

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Deyashkin, 2019-06-01
@AiZen_13

First, a couple of things to note:
1. Don't store any code derivatives in the git. That is, minified scripts, styles, etc. They should be built from sources at the stage of building and no changes should be made to them - all changes are only to the sources.
2. You wrote that the customer can edit css, etc. Here you need to understand that this is not part of your application and your code. This is already user data and they have no place in the project repository. If you want to version them, you can use your git repository for them.
> I want to have only the build of the project on the market - without the source code.
There are many ways to do this. Alternatively, you can have a project repository on production and use it to build a specific instance of the system during deployment. Then on the server itself you will have the sources, and it will be easy to get any version, since this is a repository, but in system instances - only what is needed. Or you can build a project on the CI server and already ready to transfer to the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question