lp://staging/~snappy-dev/snapcraft/abandoned-go-trunk
- Get this branch:
- bzr branch lp://staging/~snappy-dev/snapcraft/abandoned-go-trunk
Branch merges
Branch information
Recent revisions
- 6. By Michael Terry
-
Use ErrorMatches in a couple tests, which is prettier than strings.HasPrefix by mterry approved by elopio
- 5. By Michael Terry
-
Add gettext support to snapcraft.
This wasn't an urgent change at all. But I was curious what a gettext-enabled Go project might look like (as Go's build system doesn't seem to cater to data files). Since snapcraft only has a little bit of code and few messages, it was an easy task to tackle.
I chose the "github.
com/gosexy/ gettext" module based on my research here:
https://bugs.launchpad .net/snappy/ +bug/1462085/ comments/ 1 - I added a helpers/dirs.go file to locate our data files at run time (supporting both a snapified mode and a deb mode).
- I added a script to update the pot file and a check in run-checks that makes sure if you change any strings, you know you need to update the pot file.
- I added a dummy package.yaml and a simple make-snap script to make an example snap (I wanted to see what it would look like to distribute the .mo files, plus it's good to be able to make a snap for testing purposes)
- I added a dummy en_US.po null translation just as an example (so I could see *something* installed in the locales folder). We can drop it later when we have real translations.
I don't think we should enable translations in LP yet, since all our strings are provisional. But I just wanted to lay the groundwork.
I tested this locally (locale changing in a snappy system doesn't work?) with a fake translation and it seemed to work. by mterry approved by mvo
- 4. By Michael Terry
-
Add basic yaml parsing and simple 'xscratch info' command.
This is just a code drop for some stuff I think we'll need in SOME form, even if it changes slightly down the road.
There are two main additions here. One is a config module that handles parsing our snappy.yaml format. Just basic stuff so far.
And the other is a new command to actually exercise that code, by dumping out the scratch build environment's configuration (which we don't have any code to actually manage yet, but one can fake it).
I've followed the example of our existing specification and used "x-" liberally to make sure everyone understands things are in flux. Even for the 'scratch' command, where I've used 'xscratch' instead.
And I've kept our unit test coverage at 100%. Woo! by mterry approved by mvo
- 2. By Michael Terry
-
Add comment in main.go warning away expanding it; add defers to tests to keep os.Args the same
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)