Versioning
To ensure that permanent URLs to an attachment for a specification are readable and permanent follow the best practices listed below.
Contents
In brief
GOOD examples:
Usage | Example |
---|---|
For the entire project | forge.etsi.org/rep/<TB>/<SPEC>/<VERSION>
|
For a folder within the project | forge.etsi.org/rep/<TB>/<SPEC>/tree/<VERSION>/<FILE>
|
For a file in the mode | forge.etsi.org/rep/<TB>/<SPEC>/blob/<VERSION>/<FILE>
|
BAD examples:
Bad practice | Example |
---|---|
Do not include the tool (Gitlab) in the tool | forge.etsi.org/gitlab/...
|
Do not include the version in the name of the file | forge.etsi.org/rep/<TB>/<SPEC>/blob/<BRANCH>/my_file_vA.B.C.txt
|
Avoid using a link to master unless you know what you are doing | forge.etsi.org/rep/<TB>/<SPEC>/blob/master/...
|
Tool independent link
Remember to use the tool independent link: forge.etsi.org/rep
Use Tags!
Once the final version of the file is uploaded to the repository (see here how to do it), you want to create a GIT Tag with the correct version (e.g. the version of the ETSI Deliverable).
To do so, follow the steps:
- Go to the repository
- In the menu on the left, select
Repository
thenTags
- Click on the Create Tag green button
- Fill in the following information
- Tag name: the version in a short version, e.g. v2.1.1
- Create from: Choose the correct branch or revision! (IMPORTANT)
- Message: You may add a description of the version
- Release note: Optional
Pretty view vs Raw view
When clicking on file in a repository, the repository manager app (Gitlab) will show the contents presented in a framed box, with syntax highlighting (if supported). This is a "prettyfied" view.
In order to view the file in a "standalone" mode, i.e. the direct file only, you may want to have a "raw" view of the file. The raw view can be reached with the button at the top of the content frame as show in the figure below.
Do not encode versioning in the files
Do not hard code the version in the file name, e.g. DO NOT:
my_file_v2.1.1.json
instead use
my_file.json
and let the GIT system manage and provide the licensing information.
In the same way, it is very bad practice to keep a list of folders such as (example based on fictitious ASN.1 modules for TB XYZ):
TB_XYZ_ASN.1_modules_v1 TB_XYZ_ASN.1_modules_v2 TB_XYZ_ASN.1_modules_v3 TB_XYZ_ASN.1_modules_v4 etc.