I'm on Xcode 6.4 and Server 4.1.2.
The first thing I should mention is that I can't use ssh.
With that out of the way, if anyone can help I'll be eternally grateful.
I need to run a post-build script on my bot which creates a tag and pushes it to the remote upon build success. I've tried running it as a "post" script defined on the bot, as a "build stage" within the project build settings, and as a post-build script in the custom shared scheme I'm using for CI. The closest it's come to work is the post-script on the scheme archive step. The script looks like this:
if [ -z "$PROJECT_DIR" ]; then
echo "No project dir variable"
else
cd $PROJECT_DIR;
echo "PROJECT_DIR is $PROJECT_DIR";
echo "Directory is $(pwd)";
git config user.email "myself@mycompany.com"
git config user.name "myself"
CURRENTTAG=$(git describe --abbrev=0 --tags);
echo "CURRENTTAG is $CURRENTTAG";
CURRENTTAG_PRE=`echo $CURRENTTAG | awk -F "_" '{print $1}'`;
echo "CURRENTTAG_PRE is $CURRENTTAG_PRE";
CURRENTTAG_POST=`echo $CURRENTTAG | awk -F "_" '{print $2}'`;
echo "CURRENTTAG_POST is $CURRENTTAG_POST";
if [ -z "$CURRENTTAG_POST" ]; then
echo "catastrophic failure"
exit 0
else
CURRENTTAG_POST=$(($CURRENTTAG_POST + 1));
SPACE="_";
NEW_TAG=$CURRENTTAG_PRE$SPACE$CURRENTTAG_POST;
echo "NEW_TAG is $NEW_TAG";
git tag -a $NEW_TAG -m "$NEW_TAG";
git push origin "$NEW_TAG"
echo "New tag $(git describe --abbrev=0 --tags) created"
fi
fiThe hack with the git config commands is there to stop git from asking the bot "Please tell me who you are". Once the bot gets past that, though, the git push fails with the following:
fatal: could not read Password for 'https://myself@mygitremote.com': Device not configured
Can anyone offer any HTTPS-based suggestions as to how I can get past this?
Thanks.