Skip to content
Advertisement

I want to automate my angular build using pos-receive in background process

I want to automate my angular build using pos-receive and i want it to run in backgound process so I will not wait to finish the command.

I tried the following the following code on my post-receive but it doesn’t work.

post-receive

JavaScript

I also tried to create a separate executable script on usr/local/bin directory like this

build-app-script

JavaScript

then on my post-receive i change the code

JavaScript

to

JavaScript

the script seems working because it create a test-dir but the ng-build –prod command is not executing

Any idea why is not working? or any suggestion. Thanks!

Advertisement

Answer

I think i figure out my problem, i have a vps server on digital ocean with 500mb of ram. So when i run the ng build –prod command the process get killed. I think because of the insuficient ram. Then after googling solutions i found this tutorial that will add an extra ram to your server and it works perfectly. Ref: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement