languages: add MOOS guide #131

Merged
merged 3 commits into from Oct 4, 2017

Conversation

Projects
None yet
3 participants
Collaborator

kyrofa commented Oct 4, 2017

My take of the user-story-driven docs for MOOS developers.

languages: add MOOS guide
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>

99% there. Thanks for this!

build-snaps/moos.md
+
+## Getting started
+
+Let's take a look at ping/pong MOOS example application, and show how simple it is to snap.
@evandandrea

evandandrea Oct 4, 2017

Collaborator

A ping pong

@evandandrea

evandandrea Oct 4, 2017

Collaborator

Or the

@kyrofa

kyrofa Oct 4, 2017

Collaborator

Done. Went with "the".

build-snaps/moos.md
+
+You can [extend the behaviour](/build-snaps/scriptlets) of any part in your `snapcraft.yaml` with shell commands. These can be run after pulling the source code but before building by using the `prepare` keyword. The build process can be overridden entirely using the `build` keyword and shell commands. The `install` keyword is used to run shell commands after building your code, useful for making post build modifications such as relocating build assets.
+
+For example, let's pretend that the MOOS examples contained a suite of tests (they don't, so this won't actually work). We could run that test suite at the end of the build. If these tests failed, the snap creation would be terminated:
@evandandrea

evandandrea Oct 4, 2017

Collaborator

Is there really no functional example we can give for scrollers? It’s weird to say “don’t try this, it won’t work.”

@kyrofa

kyrofa Oct 4, 2017

Collaborator

I'm afraid not. This is the best pre-baked example we have, and it doesn't even have install rules much less tests 😢 . We can remove this section entirely, of course.

@evandandrea

evandandrea Oct 4, 2017

Collaborator

Are MOOS developers likely to need scriplets? If not, I’d drop it. If they are, well, it doesn’t have to be tests.

@kyrofa

kyrofa Oct 4, 2017

Collaborator

Not necessarily, the best example is to run their own tests. I'll go ahead and drop this section, at least for now. We can add it back if we come up with a brilliant idea.

@kyrofa

kyrofa Oct 4, 2017

Collaborator

Done.

kyrofa added some commits Oct 4, 2017

s/ping\/pong/the ping pong/
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
Toast the scriptlet section
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
Collaborator

evandandrea commented Oct 4, 2017

We’ll need a PR to link to it, but let’s get this landed 👍

@evandandrea evandandrea merged commit 7798c42 into canonical-docs:master Oct 4, 2017

Collaborator

sergiusens commented Oct 5, 2017

well... that was quick ;-)

should I still read through this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment