release_setup
new_changelog(changelog_contents, owner, repo, new_ver, first_sha)
¶
Modify the contents of a CHANGELOG.
It adds a new entry with the new version the new changelog contents.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
changelog_contents |
str
|
The current contents of the CHANGELOG file. |
required |
owner |
str
|
The repo owner. |
required |
repo |
str
|
The repo name. |
required |
new_ver |
str
|
The new version. |
required |
first_sha |
str
|
The very first commit sha of the repo. |
required |
Returns:
Type | Description |
---|---|
Res[str]
|
The new contents of the CHANGELOG. |
Source code in m/ci/release_setup.py
release_setup(m_dir, config_inst, new_ver, changelog='CHANGELOG.md')
¶
Modify all the necessary files to create a release.
These include: CHANGELOG.md and the m configuration file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m_dir |
str
|
The directory with the m configuration. |
required |
config_inst |
Config | None
|
If provided it skips reading the configuration. |
required |
new_ver |
str
|
The new version to write in the m configuration. |
required |
changelog |
str
|
The name of the changelog file (defaults to CHANGELOG.md) |
'CHANGELOG.md'
|
Returns:
Type | Description |
---|---|
Res[None]
|
None if successful, otherwise an issue. |
Source code in m/ci/release_setup.py
update_changelog_file(owner, repo, new_ver, first_sha, filename='CHANGELOG.md')
¶
Add the new version entry to be released to the CHANGELOG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
owner |
str
|
The repo owner. |
required |
repo |
str
|
The repo name. |
required |
new_ver |
str
|
The version that is being released. |
required |
first_sha |
str
|
The first sha ever committed on the repo. |
required |
filename |
str
|
Specify the CHANGELOG file (defaults to CHANGELOG.md) |
'CHANGELOG.md'
|
Returns:
Type | Description |
---|---|
Res[int]
|
0 if successful, an issue otherwise. |
Source code in m/ci/release_setup.py
update_version(root, version)
¶
Update the version property in m configuration file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root |
str
|
The directory with the m configuration file. |
required |
version |
str
|
The new version to write in the m configuration. |
required |
Returns:
Type | Description |
---|---|
Res[int]
|
0 if successful or an issue. |