D
D
daniel_wesson2020-11-10 18:13:46
git
daniel_wesson, 2020-11-10 18:13:46

How not to take into account the compiled code in the GIT system, but at the same time roll it out for production?

Here, for example, I have compiled css / js. I absolutely do not need these files to be marked as changed with each commit, they are simply not needed for change control, since I need to track changes in the source. Nevertheless, the production server uses these files, and, of course, they must be fresh. How to be in such a situation? Add them to gitignore and compile on sale like that.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2020-11-10
@saboteur_kiev

The procedure for deploying to production needs to be changed
Instead of git pull on production, collect the distribution distribution on the intermediate server into some tgz thread and upload it to production already compiled.

F
feycot, 2020-11-10
@feycot

The compilation stage can be moved to CI/CD.
For example, if Gitlab is used, then set up a pipeline, in which, after the push, the application is assembled and the already compiled files are sent to production.

E
Egor Zhivagin, 2020-11-10
@Krasnodar_etc

Add them to gitignore and compile on sale like that.

That's exactly what everyone does. The assembly of the pro version takes place on the pro

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question