You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
3.5 KiB

11 months ago
  1. # Upgrading Ceedling
  2. You'd like to stay in sync with the latest Ceedling... and who wouldn't? Depending on
  3. how you've made use of Ceedling, that may vary slightly. No matter what, though, our first
  4. step is to update Ceedling itself.
  5. ## Step 1: Update Ceedling Itself
  6. ```
  7. gem update ceedling
  8. ```
  9. That should do it... unless you don't have a valid connection to the internet. In that case,
  10. you might have to download the gem from rubygems.org and then install it manually:
  11. ```
  12. gem update ceedling --local=ceedling-filename.zip
  13. ```
  14. ## Step 2: Udpate Projects Using Ceedling
  15. When you set up your project(s), it was either configured to use the gem directly, or it was
  16. configured to install itself locally (often into a vendor directory).
  17. For projects that are of the first type, congratulations, you're finished. The project will
  18. automatically use the new ceedling. There MAY be things that need to be tweaked if features have
  19. moved significantly. (And we apologize if that's your situation... as we get to version 1, we're
  20. going to have a stronger focus on backwards compatibility). If your project isn't working perfectly,
  21. skip down to Step 3.
  22. If the project was installed to have a copy of ceedling locally, you have a choice. You may
  23. choose to continue to run THIS project on the old version of Ceedling. Often this is the
  24. preferred method for legacy projects which only get occasional focus. Why go through the effort
  25. of updating for new tools if it's serving its purpose and you're unlikely to actually use the new
  26. features?
  27. The other choice, of course, is to update it. To do so, we open a command prompt and address ceedling
  28. from *outside* the project. For example, let's say we have the following structure:
  29. - projects
  30. - myproject
  31. - project.yml
  32. - src
  33. - tgt
  34. - vendor
  35. In this case, we'd want to be in the `projects` directory. At that point, we can ask Ceedling to
  36. update our project.
  37. ```
  38. ceedling upgrade myproject
  39. ```
  40. Ceedling will automatically look for your project yaml file and do its best to determine what needs
  41. to be updated. If installed locally, this will mean copying the latest copy of Unity, CMock, and
  42. Ceedling. It will also involve copying documentation, if you had that installed.
  43. ## Step 3: Solving Problems
  44. We wish every project would update seamlessly... unfortunately there is a lot of customization that
  45. goes into each project, and Ceedling often isn't aware of all of these. To make matter worse, Ceedling
  46. has been in pre-release for awhile, meaning it occasionally has significant changes that may break
  47. current installations. We've tried to capture the common ones here:
  48. ### rakefile
  49. Ceedling is built in a utility called Rake. In the past, rake was the method that the user actually
  50. interacted with Ceedling. That's no longer the case. Using a modern version of Ceedling means that
  51. you issue commands like `ceedling test:all` instead of `rake test:all`. If you have a continuous
  52. integration server or other calling service, it may need to be updated to comply.
  53. Similarly, older versions of Ceedling actually placed a rakefile in the project directory, allowing
  54. the project to customize its own flow. For the most part this went unused and better ways were later
  55. introduced. At this point, the `rakefile` is more trouble than its worth and often should just be
  56. removed.
  57. ### plugins
  58. If you have custom plugins installed to your project, the plugin architecture has gone through some
  59. revisions and it may or may not be compatible at this time. Again, this is a problem which should
  60. not exist soon.