AutoGist v2.2.8 - Version control projects, push/pull, Create Installers/Updaters!

I just did the following:

  1. Duplicated the old AutoGist and deleted the original
  2. Reinstalled AutoGist using the above instructions

It didn’t re-ask me for my username and password and Just Worked, so I deleted the duplicate. So simply replacing AutoGist works fine.

Cool, however, by duplicating you might have lost the saved Gist id’s from your projects. They are currently saved as local.

But they’re in the local data of the individual project, aren’t they? It was only the AutoGist project that I deleted and replaced. I just checked and my test project updated properly.

oh good, I follow what you did now.

So in order for AutoGist to check for updates I need to store more info and the individual revision keys. This is going to take a re write on how data is stored. I should have it out in a few days.

@Andrew_Stacey do you think i should just scrap Gister? Its so similar to AutoGist minus the version control. I could just add in the ability to push a gist from AutoGist, thus rendering Gister useless.

@Briarfox: I’ve just read the description of Gister and I can’t see why I would want it given that I already have AutoGist, so unless there’s something sneaky that I can’t see I’d amalgamate them.

Okay, next question. Using AutoGist I can pull a gist from somewhere into a project. You’ve added the “Update AutoGist” button. I’d also like an “Update Project X” button. Namely, AutoGist should remember the gist it used to create a project and have the ability to redownload it upon request (though one problem I can see with this is if the latest version of the project has different tabs to the old one - can one delete tabs programmatically? Still, I could delete the old project and create a new one with the same name which AutoGist could repopulate so it would still be useful to keep a record of the gist and project names.)

And another feature request: if I pull a gist that is stored as a single file (ie with the --# TabName format), do you think AutoGist could detect that and split it into tabs?

@Andrew_Stacey Thanks for the suggestions. Currently I need to re write the way data is saved to accomadate all the keys of projects that have been pulled. I should have this done this weekend. However in the meantime, you can manually update by putting in the project name and it’s gist id. Press Gist_it and it will update the project. I’m trying to figure out what the best way to show that your projects need to be updated. I was thinking of having an update button appear on the main screen for each project that is out of date. The problemI’m running into is how do you delete a project ifyou no longer wish autogist to update it? I really do not want to add more tabs for the GistManagment part becuase they will be included if you are using the backup features of AutoGist.

It should be easy to split single files. I’ll just get the gist and parse the tabs looking for Codeas break–# TabName.

@Briarfox:

However in the meantime, you can manually update by putting in the project name and it’s gist id.

Yes, I see that. What I’m trying to avoid is having to remember (or cut-and-paste) the gist id: if I’ve put it in once, the program should remember it! So then it just needs a table with the gist/name pairs. If you no longer want AutoGist to update it then you just need to delete the pair from the table.

I follow you, its coming :slight_smile: Thats just a temp solution if you need to update.

I’d like to avoid having people need to edit the table key. I just need to find the best way to display what needs updating and a way to stop it from updating. I’d like AutoGist to tell you when a project is a version behind.

I agree that you don’t want people editing the table key directly, that was a suggestion as to how the program could do it.

Oh, and while you’re looking at the code, may I suggest a more advanced version comparison. People like all sorts of things as version strings so a simple numerical comparison might not cover all possibilities.

Yeah I did it that was because it was easy. I mainly wanted to see if there was interest in AutoGist. I feel there is, so I’ll add that into the todo as well :slight_smile:

Just encountered a problem and am not sure if it is solvable. I wanted to upload a large project and the request timed out. The project uploaded successfully, but because it didn’t get the confirmation then it doesn’t know that it worked so it keeps trying to upload a new gist every time.

One fix would be for me to manually save the information. What information does AutoGist need to know to know that a successful upload has taken place?

@Andrew_Stacey It first needs the gist ID key stored. you can manualy set this by AutoGist.setKey(“versionkey”,“buildkey”) Then it needs the version number to compare with VERSION at the top of the project. Set saveLocalData(“AutoGist_Version”,“current Version”)

You could also use the manual gist to update it.

I’ll take a look at it and see what I can do about it.

@Briarfox Thanks. Where do I find the versionkey and buildkey? The project is: https://gist.github.com/loopspace/5602199 if that helps.

Another question: how does AutoGist work out the order of the tabs?

– Edit: My mistake. Fixed it when I got the project info right.

Hmm … I have installed and added autogist to my project. It uploaded the first version, but now that I updated the version number I get the following error:
error: [string “AutoGist = …”]:113 bad argument #1 to ‘openUrl’ (string expected, got nil)

Any ideas on how to fix it?

Also tabs come out in wrong order when I try to pull the project

@Andrew_Stacey Save 5602199 as the gist Id and in order to stop it from updating everytime you’ll need to have saveLocalData(“AuotGist_Version”,x.xx) match VERSION=x.xx at the top.

@presidenten It appears that you are trying to do the first gist because it will not try to open a url unless it’s the first attempt. Can you try it on a small project and see if it works? Tab order is not maintained because Gist alphabetizes them. I’ll need to work on a way to maintain the tab order.

@Andrew_Stacey Ok I just had the same problem with your project. Codea Crashes but the pull request works. What If I were to pull each file individually? I’m not sure it would fix it but it might.

@presidenten I got the same error. However, it was becuase I did a manual gist entered the project name and gistid and hit Gist_It on accident, it was a gist ID to a project that was not mine. Does your error show a message not found as well?

@Briarfox Thanks. Just to be absolutely sure, do I save the gist id as the versionkey or the buildkey (I think I know, but would like it confirmed!)

Versionkey.

The buildkey is used if you use BUILD=true. it creates a new gist id for builds, it reset whenever you update the version. so

versionkey - one single gist

buildkey - new key with every new version

@Briar
The problem I had was that I had a spelling error in the project name in autogist.setprojectinfo.

When it comes to tab order I have a suggestion. If I assume you can read the tabs in the correct order, you can put the files in gist with the addon of a two digit number before the name. Like this:
“01. tabone.lua”,
“02. tabtwo.lua”
etc
Then remove 4 characters in the beggining and you have split at the dot and you have the tab name :slight_smile: