Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8479269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:58:36+00:00 2026-06-10T18:58:36+00:00

The Setup I’ve got a Mac mini set up with Jenkins pulling a repo

  • 0

The Setup

I’ve got a Mac mini set up with Jenkins pulling a repo down from GitHub and performing an Xcode build. Because the mini is firewalled off from the internet I am polling GitHub for changes every 15 minutes.

Prior to kicking off the Xcode build I have Jenkins execute the following script to bump my project build number and commit the results to the repo:

#!/bin/sh

agvtool bump -all
/usr/local/git/bin/git commit -a -m "This is Jenkins, updating your build numbers, sir."

After the build I have a post-build action set up to run another script that pulls and then pushes from GitHub, like so:

#!/bin/sh

/usr/local/git/bin/git pull origin develop
/usr/local/git/bin/git push origin develop

The Problem

Because Jenkins is performing a commit and a push to GitHub each time it runs, the next poll will find the changes it pushed up last time, creating a new build whether there were other actual changes or not.

The Question

Is there something wonky in my setup that I should be doing differently? I’d like Jenkins to update my Xcode target’s build number and commit and push that result to GitHub. This configuration obviously accomplishes that, but with the side effect of a build every 15 minutes, instead of a build every 15 minutes as needed.

Jenkins is consulting the SHA1 of the lastSuccessfulBuild to determine if there have been changes, but it’s doing that before my commit. Is there a way to set the SHA1 of the current build to the hash resulting from the commit of the version number bump? Something like so:

#!/bin/sh

agvtool bump -all
/usr/local/git/bin/git commit -a -m "This is Jenkins, updating your build numbers, sir."
NEW_SHA=$(/usr/local/git/bin/git rev-parse HEAD)
# Some awesome Jenkins-fu to set the SHA1 of the current build to NEW_SHA

This way when Jenkins compares hashes the next time around it won’t build unless there have been changes since its commit to bump version numbers.

Thanks for any and all help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:58:37+00:00Added an answer on June 10, 2026 at 6:58 pm

    I think this SO question answers your question, but I can’t say for certain as we’re not doing build version increment on a polling branch. I would also do the git push prior to building, that way you won’t have to worry about as many merges that would occur should you commit code things during the build. Thankfully, if you keep it how it is you won’t have much to worry about in the way of Xcode project merges.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Setup I'm writing a script to process and annotate build logs from Visual Studio.
setup.py from distutils.core import setup import py2exe setup(console=['program.py']) The error Traceback (most recent call
Setup Mac OSX 10.6.7, Eclipse, Tomcat 1.6 I am trying to call a string
Setup is following: Drupal project, one svn repo with trunk/qa/production-ready branches, vhosts for every
Setup: I'm looking for insight into using a ABPersonViewContoller without getting data from the
setup: cakephp, jquery 1.8.7, cakephp.bee.pl ajax helper I have a website who is set
Setup: Open Excel 2007, set the width of the first column to 15.0 (110
Setup using a simple example: I've got 1 table ( Totals ) that holds
Setup: ASP.NET MVC3, jQuery, C# Has anyone got a clean solution to handle different
Setup: 3 git repos - on github, local and on staging server. I develop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.