# Different logic for different branches

**URL:** <https://discuss.circleci.com/t/different-logic-for-different-branches/9639>\
**Category:** Build Environment\
**Created:** [January 16, 2017, 5:23pm UTC](https://discuss.circleci.com/t/different-logic-for-different-branches/9639 "2017-01-16T17:23:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rymoore](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rymoore/32/15227_2.png) [@rymoore](https://discuss.circleci.com/u/rymoore)\
**Post date:** [January 16, 2017, 5:23pm UTC](https://discuss.circleci.com/t/different-logic-for-different-branches/9639/1 "2017-01-16T17:23:06Z")

</div>

I am trying to accomplish a test/build scenario that will do the following:

- If code is checked into the “develop” branch, I’d like Circle to pull that code, test it, and run a certain script ([build-dev.sh](http://build-dev.sh))
- If code is checked into the “master” branch, I’d like Circle to pull that code, test it, and run a different script ([build-prod.sh](http://build-prod.sh))

How can I set this up?

---

<div class="post-metadata">

**Author:** ![rymoore](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rymoore/32/15227_2.png) [@rymoore](https://discuss.circleci.com/u/rymoore)\
**Post date:** [January 16, 2017, 6:40pm UTC](https://discuss.circleci.com/t/different-logic-for-different-branches/9639/2 "2017-01-16T18:40:44Z")

</div>

actually, may have just found it

[https://circleci.com/docs/configuration/#deployment](https://circleci.com/docs/configuration/#deployment)

---

<div class="post-metadata">

**Author:** ![gregorynicholas](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/gregorynicholas/32/6049_2.png) [@gregorynicholas](https://discuss.circleci.com/u/gregorynicholas)\
**Post date:** [January 19, 2017, 7:55am UTC](https://discuss.circleci.com/t/different-logic-for-different-branches/9639/3 "2017-01-19T07:55:16Z")

</div>

theres definitely patterns ive found to be cleaner… shoot me a message if its something you might be interested in talking more about

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:39am UTC](https://discuss.circleci.com/t/different-logic-for-different-branches/9639/4 "2018-06-18T11:39:04Z")

</div>


