- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
Implementing Semantic Versioning Principles
In this lab, you'll apply semantic versioning to communicate software compatibility. You will differentiate major, minor, and patch version changes, assign version numbers to a series of code changes, and explain how those versions communicate compatibility to consumers. When you're finished, you will have tagged and incremented versions against realistic change scenarios using semantic versioning conventions.
Lab Info
Table of Contents
-
Challenge
Access the terminal and initialize the versioned project
Open the Ubuntu Console from the lab environment, verify that Git is available, configure your commit identity, and initialize the repository with the first version of the shared library.
-
Challenge
Tag the initial stable release as version 1.0.0
A semantic version has three fields,
MAJOR.MINOR.PATCH.MAJORincreases when a release breaks existing consumers,MINORincreases when a release adds functionality that existing consumers can ignore, andPATCHincreases when a release only fixes behavior. The library interface is now stable enough for other teams to depend on, so version1.0.0marks the first interface that consumers can depend on. Record the reason in a changelog and create an annotated tag that marks the release. -
Challenge
Increment the patch version for a backward-compatible fix
A consumer reports that
resource_countalways returns1instead of the number of resources. The fix corrects the behavior without changing any function name or parameter, so it is a patch release. -
Challenge
Increment the minor version for backward-compatible functionality
Another team wants to filter the resource list by a name prefix. Adding a new function gives them that capability while every existing function keeps working, so this is a minor release.
-
Challenge
Increment the major version for a breaking change
The team decides that every resource lookup must be scoped to an environment. This means renaming
list_resourcestoget_resourcesand requiring an environment argument. Existing consumers that calllist_resourceswill break, so this is a major release. -
Challenge
The last objective
Welcome to the final objective! This is your last chance to experiment in the environment. Clicking End Lab will end this little world that flittered into existence just for you.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.