简体   繁体   中英

gulp, git, php & production build

I have a application in php. I use a lots of javascript, css, fonts and other thing.

Everything is versionned with git, and I update my servers with git. My server are on the master branch, and I push everything to it to update the code on my server.

So, now I would like to upgrade my code and start using gulp with it to automatically compile javascript, use sass and generate fonts.

I do not wish to install gulp on my server in case something goes wrong, my website will be unoperationnal. So I have to be able to create a build version with the compiled files of javascript, css... But don't want to always commit thoses files since it will cause conflict in my team everytime we change version.

What would be the best workflow to create a build version with all the compiled files and not cause any conflict in git?

Thank you

This is my setup:

在此处输入图片说明

Notice the task deploy? Well, deploy with the parameter --release , releases to a different location that just plain deploy .

It should be as simple as deploying to different locations. In your case to different hosted folders from which you can access two different web apps. One that works, and one in development.

To your statement:

I do not wish to install gulp on my server in case something goes wrong,

You don't need gulp on your server at all whatsoever. I have gulp on my build Teamcity server, but that's about it.

Anyhow, that's what works for me. I hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM