Skip to content

Commit

Permalink
doc: Update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Mar 22, 2024
1 parent bf507fb commit d9f8e83
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 12 deletions.
17 changes: 11 additions & 6 deletions doc/usage/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,30 @@ Example
``update``
==========

.. todo:: TBD
Update version and edit rarget files.

``major``
=========

.. todo:: TBD
Shortcut subcommand of ``update`` for major version updating.

If ``current_version`` is "1.2.3", this command changes version for "2.0.0".

``minor``
=========

.. todo:: TBD
Shortcut subcommand of ``update`` for minor version updating.

If ``current_version`` is "1.2.3", this command changes version for "1.3.0".

``patch``
=========

.. todo:: TBD
Shortcut subcommand of ``update`` for patch version updating.

If ``current_version`` is "1.2.3", this command changes version for "1.2.4".

``info``
========

.. todo:: TBD

Display information of configuation file.
66 changes: 66 additions & 0 deletions doc/usage/configuration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
=============
Configuration
=============

You need setup age's configuration on your project.

First setup
===========

After install, you can get configuration file as ``.age.toml`` by running command ``age init``.

.. code-block:: console
:caption: Simple Rust project
age init
.. code-block:: console
:caption: For Python project
age init --preset python
If you want to using sample, Please see `configuration file of project itself <https://github.com/attakei/age-cli/blob/main/.age.toml>`_.

Configuration values
====================

``current_version``
-------------------

Version text managed by age.

.. warning::

This is auto-updated value by age.
Do not edit manually.

``files``
---------

List of target to replace by age.

.. code-block:: toml
:caption: Simple example
[[files]]
path = "Cargo.toml"
search = "version = \"{{current_version}}\""
replace = "version = \"{{new_version}}\""
``files[].path``
----------------

File path of replacement target.
This should be relative path of configuration file.

``files[].search``
------------------

Search target of file.
This accepts multi-line text and using templating.

``files[].replace``
-------------------

Replacement text for search target of file.
This accepts multi-line text and using templating.
2 changes: 1 addition & 1 deletion doc/usage/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ There are some steps to use age.
:maxdepth: 2

installation
setup
configuration
commands
5 changes: 0 additions & 5 deletions doc/usage/setup.rst

This file was deleted.

0 comments on commit d9f8e83

Please sign in to comment.