Versioning Automation Tool
Hello!
It was always interesting what product versions are and how to manage them? How to automate version control development? I ask under the cat.
My name is Roman. I am a developer in a very interesting company Softeq, where every person is an inspiration.
When developing various tools, I fell into thinking about whether all developers know what a version is, what meaning it carries and how to manage it during development. So let's look at what versioning is.
Versioning - development and management of several releases of a product that have the same general functionality, but are improved, upgraded or individualized.
In short, the version talks about changing the product. How does the version talk about changing the product?
Let's call the character ordering system to indicate the product version — the versioning scheme. Different versioning schemes have been created to keep track of different software versions.
There are a lot of versioning schemes, but we are faced with semantic versioning every day. Semantic versioning is characterized by the fact that version numbers and how they change convey the meaning of the source code content and which modifications were applied from one version to another.
Let us consider how the number of the Semantic version is formed.
Let's imagine that we have a project in development. The main task of the project is to manage the construction of the library. The project allows you to order materials for building a building, control the stages of building a library. At present, the application architecture has been designed, basic tasks have been implemented. When testing the functionality of the order of materials for building the library building, an error, bug . Produced error correction and increased Patch version of the project.
The customer had an idea about the need to implement an analysis of marketing information in the project. Developers skillfully and quickly designed data analysis services, integrated services with the current architecture. Added the addition of new project functionality, which does not violate backward compatibility . Increased Minor version of the project.
The project was successfully implemented. After some time, the customer had an idea to develop this business automation technology. In the upcoming plans were completely new services: the formation of a team of builders, an internal social network, internal exchange of documents and so on. The developers showed high competence, and after a while the project architecture was designed to solve both new and old tasks. The new architecture of the project has made back incompatible changes. Increased Major version of the project.
So, we present what the product version is. But how to manage them?
Let's take a look at the versioning automation tool.
NPM: https://www.npmjs.com/package/versionings
GitHub: https://github.com/morozow/versionings
Version control is performed using the command line:
The current version of the product is stored in the project ./package.json file, as well as in the Git tags and the upgrade branch. Automation has the ability to integrate with various third-party tools - versioning is done through the CLI command.
Let's look at an example of upgrading a product.
A draft of the current version 2.5.3 is being developed . Development of a new project service is carried out in the crm-user-service branch . The development of the service was completed, all changes were committed and a decision was made to increase the minor version:
That's all :)
All productive mood and a great day!
It was always interesting what product versions are and how to manage them? How to automate version control development? I ask under the cat.
My name is Roman. I am a developer in a very interesting company Softeq, where every person is an inspiration.
When developing various tools, I fell into thinking about whether all developers know what a version is, what meaning it carries and how to manage it during development. So let's look at what versioning is.
Versioning
Versioning - development and management of several releases of a product that have the same general functionality, but are improved, upgraded or individualized.
In short, the version talks about changing the product. How does the version talk about changing the product?
Let's call the character ordering system to indicate the product version — the versioning scheme. Different versioning schemes have been created to keep track of different software versions.
Semantic versioning
There are a lot of versioning schemes, but we are faced with semantic versioning every day. Semantic versioning is characterized by the fact that version numbers and how they change convey the meaning of the source code content and which modifications were applied from one version to another.
Let us consider how the number of the Semantic version is formed.
Let's imagine that we have a project in development. The main task of the project is to manage the construction of the library. The project allows you to order materials for building a building, control the stages of building a library. At present, the application architecture has been designed, basic tasks have been implemented. When testing the functionality of the order of materials for building the library building, an error, bug . Produced error correction and increased Patch version of the project.
The customer had an idea about the need to implement an analysis of marketing information in the project. Developers skillfully and quickly designed data analysis services, integrated services with the current architecture. Added the addition of new project functionality, which does not violate backward compatibility . Increased Minor version of the project.
The project was successfully implemented. After some time, the customer had an idea to develop this business automation technology. In the upcoming plans were completely new services: the formation of a team of builders, an internal social network, internal exchange of documents and so on. The developers showed high competence, and after a while the project architecture was designed to solve both new and old tasks. The new architecture of the project has made back incompatible changes. Increased Major version of the project.
The full picture looks like this, but you rarely encounter it.
So, we present what the product version is. But how to manage them?
Let's take a look at the versioning automation tool.
Versionings
NPM: https://www.npmjs.com/package/versionings
GitHub: https://github.com/morozow/versionings
Version control is performed using the command line:
versionings --semver=[<semantic-version> | patch | prepatch | minor | preminor | premajor | prerelease | major] --branch=[<version-branch-name> | any-hyphen-case-less-100-characters-string] [--push]
The current version of the product is stored in the project ./package.json file, as well as in the Git tags and the upgrade branch. Automation has the ability to integrate with various third-party tools - versioning is done through the CLI command.
Let's look at an example of upgrading a product.
Actions
A draft of the current version 2.5.3 is being developed . Development of a new project service is carried out in the crm-user-service branch . The development of the service was completed, all changes were committed and a decision was made to increase the minor version:
versionings --semver=minor --branch=user-service --push
Result
- New thread: version / minor / v 2.6.0 - user-service
- Version change in
./package.json
: 2.5.3 -> 2.6.0 - Commit new version of the product in the branch version / minor / v 2.6.0 - user-service
- Push new branch with the implementation of the service and increased version of the product.
- Creating a pull request for the version / minor / v 2.6.0 branch - user-service , which contains the service implementation and an upgraded version of the product
Remarks
- Automation tool focused on Unix environment
- An example of a project for building a library is abstract, for a general versioning view.
That's all :)
All productive mood and a great day!