When to 'clone' or 'update' local copies of spark firmware

Hi @mtnscott,

Good question! Although we’re frequently improving the core-firmware repos, you might not always want to use the absolute latest version on master, since things might still be in testing. Right now there are a few ways to answer the question “Is this commit stable?” For starters, we’re transitioning to a system of more frequent feature rollouts and updates, which we’ll post about on our blog: http://blog.spark.io/ , we’ll talk about new code there. :slight_smile:

If you’re watching the repositories there are some things to watch for. When enough good changes have built up, and they’re stable, we will use git to “tag” a commit with something like “spark_n”. These versions are special, because those are the versions that new cores using Tinker will be automatically-upgraded to, and the version that will be installed at the factory. These versions need to be really good, since they’ll be the “Factory Defaults” version. Here was the last one:

We also keep a separate stable branch for code that’s built using the web IDE. This branch is updated more frequently when improvements are ready to start rolling out to everyone. Right now this branch has a not-very-pretty name, and it’ll probably be changed in the near future to something like “cloud-production”. We’re very close to pulling this branch forward again, but we want to be really confident before rolling out changes. You can check it out here:

If you’re building locally and using git, you can always stay current with these changes with a few easy commands. Assuming you’re working inside a directly cloned the repo, you can do something like:

##get everything 
git fetch --all

##list all the branches (there are a lot right now)
git branch -a

##start coding on your own local branch
git checkout -b my_awesome_project

##pull in changes from a branch
git merge compile-server2

If you’re better at git than I am (pretty likely), and if you’re working in your own repository, you can do fancier stuff like setting our repo to be an upstream source, and merge changes from that into your repo:

git remote add upstream git@github.com:spark/core-firmware.git
git fetch origin -v; git fetch upstream -v; git merge upstream/compile-server2
#(note: I found that command here: http://gitready.com/intermediate/2009/02/12/easily-fetching-upstream-changes.html )

I hope that helps!
Thanks,
David

1 Like