Mercurial - tutma geliştirme depolarından dağıtılan ve

0 Cevap php

O zaman benim yerel sitede çalışırken için development, ve production - Ben sadece çalışan ne çevre için bir anahtarı eklediğiniz bir PHP Web sitesi üzerinde çalışıyorum web barındırma canlı çalışıyor:

<?php
define('ENV','development');
//or
define('ENV','production');

Ben Mercurial ile VC altında site var, ve genellikle sadece hg push (sunucu çok hg çalışır) ile sitemde dağıtmak, ancak bu anahtarın eklenmesi ile, "üretim" site her zaman farklı olacaktır canlı dağıtılan sürümü her zaman production yerine ayarlanmış olacağını in "kalkınma" site development.

Bu benim dağıtım süreci gider gelir

  1. Geliştirmek
  2. Test
  3. hg commit -m "Made changes"
  4. hg push
  5. ssh host hg update
  6. Go karşı 1.

karşı

  1. Geliştirmek
  2. Test
  3. hg commit -m "Made changes"
  4. Change development karşı production
  5. `Hg-m commit" dev -> eşya "
  6. hg push
  7. ssh host hg update
  8. (Daha sonra :) değişim production -> development
  9. hg commit -m "prod -> dev"
  10. Go karşı 1.

Hangi tabii ki büyük değildir.

Is there some way karşı keep one insulated from the other, so that the live site will always be set karşı production and my local copy set karşı development?

0 Cevap