English Chinese (Simplified)
```
A Fedora (FAS) account in order to be able to create repositories on Copr. This tutorial's demo repository can be found link:https://copr.fedorainfracloud.org/coprs/lcts/hellocopr/[here].
Also in the spec file, set the `Version:` back to whatever version the program is at and `Source0:` back to the tarball URL. You can use macros like `%\{version}` for the latter to automatically follow version changes.
and Copr will take care of the rest.
append the changelog entry to the specfile's `%changelog` section
A specfile for our program. For more information on how to create one, refer to xref:creating-rpm-packages.adoc[Creating RPM packages] and xref:create-hello-world-rpm.adoc[How to Create a GNU Hello World RPM Package] or adapt this tutorial's link:https://pagure.io/copr-tito-quickdoc/blob/master/f/doc/hellocopr.spec.annotated[annotated example specfile].
builder = tito.builder.NoTgzBuilder tagger = tito.tagger.ReleaseTagger ```
Commit all changes for your new version.
committed to git Done! ```
Commit the changes.
Commit the changes, and create a new release with tito
```
user@host ~/copr-tito-quickdoc % tito tag
Creating output directory: /tmp/tito
Tagging new version of hellocopr: 1.0.0-1 -> 1.0.1-1
Created tag: hellocopr-1.0.1-1
View: git show HEAD
Undo: tito tag -u
Push: git push --follow-tags origin
```
Note that by ommiting the `--use-version` option, tito now updates the version automatically. It does so by
commit the result and tag it with `<name>-<version>-<release>`, i.e. `hellocopr-1.0.0-1`
Configuration can be found under _Settings_ -> _Integrations_, the page also explains the steps to configure your git repository for all common Git forges (Pagure, Github, Gitlab & Bitbucket).
Copy link:https://pagure.io/copr-tito-quickdoc/c/00963ac9339a13eefd2ab1ca42b1f72af12d3cac?branch=master[the spec file] into the project's base directory. A few changes should be made before proceeding:
create a Copr repository and publish the program to it
create a RPM package for a program
created ~/copr-tito-quickdoc/.tito
created ~/copr-tito-quickdoc/.tito/packages
Currently, the example program has its version hardcoded at multiple places. link:https://pagure.io/copr-tito-quickdoc/c/61abf1cdf622d8c9fb4f03eb6b06c4ddc1677362?branch=master[Let's change this] so that the version string is sourced from a single file. Which file this is doesn't matter, but ideally the version variable should be the only thing in it that is likely to change. In this case, we use the previously empty `src/hellocopr/pass:[__]initpass:[__].py`. We name this new version '1.0.1'.
destination_file = src/hellocopr/__init__.py template_file = .tito/templates/__init__.py.template ``` https://pagure.io/copr-tito-quickdoc/c/28600f6e41d5a4b60f2e47cf077f2fe2d9224e1d?branch=master[Commit the changes]. Now, when we tag a new release, tito will take the template, replace `$version` with whatever version was tagged, and copy the resulting file to `src/hellocopr/pass:[__]initpass:[__].py` before updating the spec file and commiting the changes.