How to change repository in the existing xcode bot? - xcode-bots

I need to migrate my Xcode Bot to another repository and I wish to keep build history. In the edit bot interface (both browser and Xcode) repository field is not editable. How can I migrate?
OS X Server version 3.1.2

This is an old question but i suspect people will find this and look for an answer as it is the top result in google. This is how you do it:
change the repo you point to in git
open your Xcode project, select the bot and hit edit bot
in the repositories tab, uncheck the one that you want to update
hit done
go back to edit bot
you should now see the new repo instead of the old one

Related

Create New Release is greyed out in Google Play Console

I have an app on Google Play but I am trying to upload a new version. I am not familar with Google Play but no matter where I go I can't seem to see how to add a new version of the app. The best I have got to is here but the Create New Release button is greyed out. Any pointers?
Click on the "Releases" link next to the "Release dashboard".
It will show you a list with the most recent release.
You can click on the 'edit' link in the release row and it will show you the upload package window or you can discard that draft release.
From there you can update your production release with the new one.
That also happens if you have a draft release for some reasons, you will have to delete it first. Obviously no clue about it from the UI, you need to guess it.
Click on the "Releases" tab, it will show you the draft release and you can delete it from there
This could be as a result of issues associated with the policy status of one of your apps in production. Go to all apps and make sure none of the apps in production have any policy issues that might need attention.
if create new release is still grayed out, do as specified in this answer by ronline.
https://stackoverflow.com/a/63511972/12931715
Click on the "Releases" link next to the "Release dashboard". It will show you a list with the most recent release.
You click on the 'edit' link in the release row and it will show you the upload package widow.
From there you can update your production release with the new one.
Whether check you have Draft releases in the "Release" tab next to the "Release dashboard" on the "Production" page.
Production -> Releases
If there is a release you can "Edit" that version or "Discard" and upload a new version.

Unable to download Bluemix starter code

I have created multiple applications from boilerplate templates and for some reason, it is no longer possible to download the Starter Code. I open the application panel, select Start Coding in the left pane, then select Eclipse Tools for Bluemix. Further down, as expected, there is a "Download Starter Code" button, but it links back to bluemix.net instead of to a code archive file. Has anyone seen this? I have deleted / re-created the apps many times, but it never produces an archive. I have seen several posts here on Starter Code, but none specifically with this issue.
In some cases this behaviour is related to the browser language setting. Try setting it to English (if you use another language) and check if the download button url now points to the correct zip.
Another possible workaround is to instantiate one of the boilerplates and then click on the Add Git button at the top right hand of the screen when viewing the overview of the running app. Using the Add Git button on a boilerplate (or runtime) instantiated app you can see the sample code in DevOps Service. You can download it from there or you could git clone the repository and get the code that way.
Alternatively please take a look at the IBM Bluemix repo on GitHub.
you can do same by three ways you can also clone git repository of starter code or you can download commandline interface and fallow instruction
for me while developing node application download eclipse archive worked fine

Add existing project to BitBucket using Xcode

I keep getting an error when I try to commit my project files using Xcode.
File -> Source Control -> Commit
"The operation could not be performed because no valid working copies were found."
"Please verify that your files are under source control and try again."
This is an existing project that is NOT under source control. How do I get my project files under source control, using Xcode?
EDIT: Answered my own question.
Step 1) Restart Xcode
Step 2) Choose connect to repo
Step 3) Enter repo address
Step 4) Choose existing project folder you wish to place under version control
Step 5) Voila! :)
Since a lot of folks land here when they google "Add existing project to BitBucket using Xcode" and then click through to the link that goes to my blog post on the subject, I thought I would put the information here (in the spirit of SO which discourages link only answers.)
NOTE: These instructions assume you have already made a local git repository for the project. You may have done this at project creation. If not, you will need to create the local git now. See this StackOverflow post for how to do that: https://stackoverflow.com/questions/19495141/add-local-repo-for-existing-xcode-5-project
For Xcode 9 and the new Beta UI for Bitbucket:
Log into your BitBucket Account on their web site.
Click the Create button (plus sign + in the newest version of the web UI). And click Repository.
Give your new repository a name. Additional features for the repo can be configured under the Advanced menu. Make sure the check mark for Private is on if you desire that. Verify that the repository type is Git. If desired, add issue tracking, and a Wiki. Select Objective C or Swift from the language drop down. Then Create Repository.
Next, you will want to add your code. On the top of the Overview page is a field with the HTTPS URL of your project. It will look something like this: https://johndoe#bitbucket.org/xyzteam/xyzapp.git. Highlight and copy that URL text.
Run Xcode and load your project.
From the left pane in Xcode, select the Source Control Navigator. Expand the project node. Right click the Remotes node under your project. Select “Add Existing Remote…”
Give it a remote name, such as Bitbucket. Paste the URL from step 4 into the Location. Click Add. It should now appear as a Remote location in the Source Control navigator.
Once your remote has been added, you should now be able to push to the remote. Select Source Control/Push… It should show your Bitbucket remote as the destination and will show (Create) as this is the first push. Click Push.
If this is the first time you are pushing this project to BitBucket, you will be asked for login credentials. The User Name will be prefilled from the URL, so enter the password. Click Okay and after some seconds, it should complete.
If all goes well, you now have the repositories linked up. Go to the BitBucket site, select your repo and you should see the code.
For Xcode older than version 9 and the old Bitbucket UI:
Log into your BitBucket Account on their web site.
Click the Create button.
Give your new repository a name, a description, and make sure the check mark for Private is on if you desire that. Verify that the repository type is Git. If desired, add issue tracking, and a Wiki. Select Objective C or Swift from the language drop down. Then Create it.
Next, you will want to add your code. I am assuming you have an existing project. On the page, you will select “I have an existing project” link from the Command line section.
You will see instructions for linking your local git repository to the remote. There is no need to follow those instructions. However, you will see an https url listed. It will look something like this: https://johndoe#bitbucket.org/xyzteam/xyzapp.git. Highlight and copy that URL text.
Run Xcode and load your project.
From the main menu, select Source Control. Under the gray “Working Copy” item, you will see a menu with your local git repo name and the currently active branch. Expand this menu and you will see an option to Configure [Your project]…. Select this.
Select the Remotes pane from this screen. At the bottom, click the plus +. Select Add Remote…
Now you need a name and a URL. For the name, typically just use your project name, then paste the URL copied earlier in step 5. Some people have found that they must remove the user name portion of the URL. Per the example, remove “johndoe#”. This may have to do with whether your project is set up as a team project, or an individual project.
Click Add Remote. Click Done.
Once your remote has been added, you should now be able to push to the remote. Select Source Control/Push…. If this is the first time you are pushing this project to BitBucket, you may be asked about keychain access and/or login credentials. Enter the appropriate responses, such as Allow for keychain. If you have already done this before, it will simply use the keychain data without further prompting.
If all goes well, you now have the repositories linked up. Go to the BitBucket site, select your repo and you should see the code.
If you want to see a version of this information with screen shots, see my blog post.
Login your bit bucket account and Create a repository in your account
open terminal run these following command
1- cd /path/to/your/repo
2- git remote add origin <url of your repository >
3- git push -f origin master
it works for me, Thanks.

Pushing Images to Git Repo from Xcode

So this problem already helped me solve another one of our issues, but I still haven't figured this one out. (This is relevant. Hold on.)
I am developing a game with one other person. Neither of us have ever used git repositories, Github (for more than reference) or any sort of version control before, and we've had some trouble getting set up.
We have our project set up in Xcode with remotes to a GitHub repo, and everything is working fine with the code. The problem is that we can't get our images (buttons, backgrounds, animations etc.) to commit to our local repo without resorting to one of two, very roundabout, methods.
Right click on our Assets group in Xcode and select Add Files to Project. I have to do this every time we add images anyway. Then, to get Xcode to realize that these are files that need to be added to the repo (at least to get the A indicator next to the files in the organizer) we have to go in and add a blank Objective-C class, then right click the images > Source Control > Add. Then delete the blank class.
Use the GitHub app to commit the project and push it from there. This isn't working because Github's .gitignore doesn't include the xcode preference files. This makes the project unable to commit from Xcode on any other machine, and even from the machine the commit was made from after a reboot. (This is the problem we figured out trying to commit images.)
So my question is: How do we share assets for the game? I figure that Xcode will do the same for sounds, we just haven't gotten there yet. Is there an easier way to get Xcode to recognize them? Or do we just need to add those user profile files to the .gitignore on GitHub? (And how do we do this?)
Every one using Git just has to watch these two videos:
Git For Ages 4 And Up
http://www.youtube.com/watch?v=1ffBJ4sVUb4
Advanced Git
http://vimeo.com/49444883
1) I've found the best way to add images to my Xcode project is to just create the directory structure I want in the Finder then just drag and drop them from my finder in to the proper group in Xcode Project Navigator. Multi select all the new files, right click (control-click on a laptop) and select Source Control -> Add
And Bobs your uncle!
2) I do not use the GitHub app, I use SourceTree and the GitHub website. I've 20 years experience with command line source control systems but Xcode and SourceTree are so good the command line is no longer a part of my daily workflow.
I create a new Xcode project and check Create local git repository for this project then I go to the GitHub create a new repository with the same name as my project's top level directory. Copy the GitHub url. Drag the new project directory into SourceTree's Bookmarks window. Double Click on the new project view in SourceTree. Right mouse click on REMOTES and paste the GitHub url and enter origin/master for the name. Click the big push toolbar button.
3) You need to add your user scheme and workspace file to .gitignore to push and pull from a remote you have to have a clean working repo. This is super simple with SourceTree just commit in Xcode and then open the project in SourceTree right click on the WorkspaceSettings.xcsettings and *.xccheme file and select Ignore... and it creates the .gitignore file for you. Now commit the .gitignore file and Push to the remote.
FYI: Check out SourceTree (http://www.sourcetreeapp.com) is's free in the Mac App Store. It's a very good GUI for Git. Atlassian makers of Jira acquired it and the original developer and released free to compliment the rest of there tools.

Add Xcode project to github repo?

I have JUST created a new github repo on the website. Keep in mind that I am a noob but can do basic things in terminal. Anyway, so I just created the repo on my account on github.com and didn't do a single thing to it yet.
So all I want to do is take my Xcode project folder and upload it to my new github repo. How do I do this via terminal?
The best way really is to follow the instructions GitHub gives you:
First, go the correct directory
cd <directory of your Xcode project>
It sound like you've already got a local Git project from Xcode. If that's true, skip this code block.
git init .
git add .
git commit -s
<type in a commit message>
Last, push into your repository. The following is copied directly from my own github account, after I created a new "test" repo. Change the "dhalperi/test" part.
Push an existing repository from the command line
git remote add origin git#github.com:dhalperi/test.git
git push -u origin master
I was just going to leave a comment above but I will also add a summarized answer. My full answer is here.
This isn't via terminal as the question requests, but you can consider this an alternate method. It is well integrated with Xcode now, though, and not difficult to do.
Create Git repository when making a new project
See the answer I linked to above if you already have a project without a Git repository.
Make a Commit
After making a change in your project, select Commit... from the Source Control menu. You will add a short commit message.
Create a new GitHub repository
On the GitHub website make a new repository. Call it whatever you want, but don't add a README or .gitignore or license yet. After creating the new repository copy the link to it.
Add a Remote in Xcode
in Xcode go to Source Control > your branch name > Configure. Then click the Remote tab > "+" button > Add remote. Fill in your repository name and address.
Push your project to GitHub
Go to Source Control > Push. You will have to enter your GitHub user name and password the first time.
That's it. Now any time you make changes in Xcode, all you have to do is Commit and Push.
If you didn't follow this explanation, please read this and this for more detail.
Further Study
This is an excellent video that I recently watched that helped me understand Git and its integration with GitHub much better.
The Basics of Git and GitHub
An easier way to do it in Xcode.
You can even push only one current branch to GitHub or the whole project.
(for Xcode 11)
Just select a needed branch/(or top folder) in "Source control navigator" and right-click on it. Then select "Create remote". Or "Editor -> Create remote".
Then use your account at GitHub to create the repository. If using your GitHub account is not proposed maybe you still not add your GitHub account in Xcode -> Preferences -> Accounts
After everything is set up. Click "Create".
To push your project/branch to GitHub repository click "Source Control -> Push".
After that check Github. All should be there.
Get the Github Mac Application, you don't really need a terminal unless you want to do more fancy advanced stuff ;-)
Simply go to your project page on GitHub, then click on "Clone in Mac", this should automatically download and install it for you. You have to do this at least once to install the app and setup some required permissions.
After that, you'll see the GitHub Application in your Dock, simply open it, then click on that small "+" sign at the bottom, there you'll see "Create New Repository" and "Add New Local Repository".
You can either add the repository that XCode already created for you or download one from GitHub, then open it in XCode.
if you already have a git repo on your Mac and using Xcode 9,
for xcode 9, just go to the source control tab in the navigation inspector in Xcode. right click on the master git and select create "Your project name" remote on GitHub.
give your GitHub credentials and give a name to git repo and Xcode will create and push your code for you.
a non terminal solution is to install SourceTree. Its a GUI thats super easy to use compared to the terminal. But its highly recommended to learn git commands properly.

Resources