[OpenStack-docs] release name in RST builds

Anne Gentle annegentle at justwriteclick.com
Tue Aug 11 13:32:39 UTC 2015


On Mon, Aug 10, 2015 at 11:43 PM, Andreas Jaeger <aj at suse.com> wrote:

> On 08/11/2015 01:12 AM, Karen Bradshaw wrote:
>
>> Hi.  I am wondering if there is a variable in the RST build environment
>> for the release name.  I am interested in possibly providing a
>> substitution variable for strings that contain the release name.
>> One example in the Install guide is a command with a URL that contains
>> 'kilo'.
>>
>> # curl -o /etc/swift/swift.conf \
>>
>> https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/kilo
>>
>> # curl -o /etc/swift/swift.conf \
>>
>> https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/%release_name%
>>
>> Or perhaps there is another way these strings are already handled from
>> release to release.
>>
>
> So far we've updated them manually ;(


I think "release" is a bit problematic because Sphinx already has a concept
of release that it adds to each page with the semver n.n.n notation.

However, you can add variables to conf.py and then refer to them in a
deliverable that uses that conf.py.

So try something like what we do for bug_tag:
https://github.com/openstack/openstack-manuals/blob/master/doc/user-guide/source/conf.py#L59

making a variable release_name or some such.

We could use http://sphinx-doc.org/rest.html#substitutions but I'm guessing
that won't work inline for URLs and such, but you can test it.

Just some ideas for you -- sorry I don't know the exact answer and would
have to experiment myself.
Anne


>
>
> Andreas
> --
>  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
>   SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
>    GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton,
>        HRB 21284 (AG Nürnberg)
>     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
>
>
> _______________________________________________
> OpenStack-docs mailing list
> OpenStack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>



-- 
Anne Gentle
Rackspace
Principal Engineer
www.justwriteclick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20150811/1a686577/attachment.html>


More information about the OpenStack-docs mailing list