[DOCs] Added a mechanism to differentiate dev and master README
This commit is contained in:
parent
a0c125cc1b
commit
9c62b22a26
|
|
@ -7,6 +7,8 @@
|
|||
[](https://pypi.org/project/kibot/)
|
||||
[](https://www.paypal.com/donate/?hosted_button_id=K2T86GDTTMRPL)
|
||||
|
||||
@doc_id@
|
||||
|
||||
**Important for CI/CD**:
|
||||
- We are now uploading docker images to GitHub, the new tags are much more simple.
|
||||
Consult: [Usage for CI/CD](#usage-for-cicd)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,25 @@ $global_options=`../src/kibot --help-global-options`;
|
|||
$dependencies=`../src/kibot --help-dependencies --markdown`;
|
||||
$json_dep=`../src/kibot --help-dependencies --json`;
|
||||
$json_dep=~s/\n/\\\n/g;
|
||||
$branch=`git rev-parse --abbrev-ref HEAD`;
|
||||
chomp($branch);
|
||||
if ($branch eq "dev")
|
||||
{
|
||||
$doc_id="# **This is the documentation for the current development KiBot, not yet released.**\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
open(FI, '../kibot/__init__.py');
|
||||
while (<FI>)
|
||||
{
|
||||
if ($_ =~ /__version__\s+=\s+\'([^\']+)\'/)
|
||||
{
|
||||
$version = $1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
$doc_id="# **This is the documentation for KiBot v$version for the current development read [here](https://github.com/INTI-CMNB/KiBot/tree/dev).**\n";
|
||||
}
|
||||
|
||||
while (<>)
|
||||
{
|
||||
|
|
@ -20,6 +39,7 @@ while (<>)
|
|||
$_ =~ s/\@global_options\@/$global_options/;
|
||||
$_ =~ s/\@dependencies\@/$dependencies/;
|
||||
$_ =~ s/\@json_dep\@/$json_dep/;
|
||||
$_ =~ s/\@doc_id\@/$doc_id/;
|
||||
print $_;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue