Compare commits
43 Commits
1.1.0.post
...
1.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
| ac70d4dde4 | |||
|
|
0d1e981b6b | ||
| 6e1c60ee53 | |||
|
|
b01779dd06 | ||
|
|
f7ec5d98a7 | ||
|
|
82d4b1bd70 | ||
|
|
880fa29bbd | ||
|
|
7347106694 | ||
| dd6f24a82e | |||
|
|
e1c1e643c3 | ||
|
|
a5f39d6cb2 | ||
|
|
c6ed7ef0a1 | ||
|
|
0ef5a8f463 | ||
|
|
e06a3b00ae | ||
| 78d7fbe39d | |||
| 3f5ee5f117 | |||
| 2d16b0e264 | |||
| 088dbf8a90 | |||
| bd49b23b59 | |||
| f5d61d8d04 | |||
| d21c839f07 | |||
| 6542c80e8f | |||
| 4272a55dde | |||
| 382e39e684 | |||
| 34c07e0d9f | |||
| 2c9886b251 | |||
| 782562eef8 | |||
| 82c32ff58c | |||
| 794e54c88b | |||
| 078f5624b2 | |||
| 44c10b88a5 | |||
| a4b7b27a65 | |||
| 77e2be2714 | |||
| f422b9ff7d | |||
| 660270d49b | |||
| 9f442a7b8e | |||
| 8fb9ba8406 | |||
| 38abaa58c5 | |||
| 35d75ea019 | |||
| 0b8651a30a | |||
| c5b3055bfe | |||
| 92a1d1a30f | |||
| f2c0bf1ddd |
43
Jenkinsfile
vendored
43
Jenkinsfile
vendored
@@ -148,6 +148,7 @@ pipeline {
|
||||
PY_PROJECT_NAME = "__NOTSET__"
|
||||
PY_PROJECT_VERSION = "__NOTSET__"
|
||||
PY_PROJECT_VERSION_STRIPPED = "__NOTSET__"
|
||||
CHANGELOG = "__NOTSET__"
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -184,16 +185,14 @@ pipeline {
|
||||
|
||||
sh(". ~/BUILD_ENV/bin/activate && pip install --upgrade setuptools build pip copier jinja2-slug toml")
|
||||
|
||||
sh(". ~/TOOLS_ENV/bin/activate && pip install simple_rest_client requests twine")
|
||||
sh(". ~/TOOLS_ENV/bin/activate && pip install simple_rest_client requests twine packaging")
|
||||
|
||||
script {
|
||||
if(_PROJECT_NAME!="pygitversionhelper") {
|
||||
sh(". ~/TOOLS_ENV/bin/activate && pip install pygitversionhelper")
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: need to install pygitversionhelper deps from a better way...
|
||||
sh(". ~/TOOLS_ENV/bin/activate && pip install packaging")
|
||||
if(_PROJECT_NAME!="pychangelogfactory") {
|
||||
sh(". ~/TOOLS_ENV/bin/activate && pip install pychangelogfactory")
|
||||
}
|
||||
}
|
||||
sh("git config --global user.email $_MaintainerEmail")
|
||||
@@ -217,6 +216,32 @@ pipeline {
|
||||
withCredentials([usernamePassword(credentialsId: _SCMCredentials, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
|
||||
sh("git remote set-url origin https://${GIT_USERNAME}:${GIT_PASSWORD}@chacha.ddns.net/gitea/${_PROJECT_USER_NAME}/${_PROJECT_NAME}.git")
|
||||
}
|
||||
|
||||
CHANGELOG = sh(script: """#!/bin/sh -
|
||||
|. ~/TOOLS_ENV/bin/activate
|
||||
|exec python - << '__EOWRAPPER__'
|
||||
|
|
||||
|import re
|
||||
|
|
||||
|try:
|
||||
| from pychangelogfactory import ChangelogFactory
|
||||
|except ImportError:
|
||||
| from src.pychangelogfactory import ChangelogFactory
|
||||
|
|
||||
|try:
|
||||
| from pygitversionhelper import gitversionhelper
|
||||
|except ImportError:
|
||||
| from src.pygitversionhelper import gitversionhelper
|
||||
|
|
||||
|
|
||||
|LastTag=gitversionhelper.tag.getLastTag(same_branch=True)
|
||||
|CommitHistory=gitversionhelper.commit.getMessagesSinceTag(LastTag, merged_output=True, ignore_merged=True)
|
||||
|Changelog = ChangelogFactory(CommitHistory).RenderFullChangelog(include_unknown=True)
|
||||
|print(Changelog.replace("\\n","\\n\\n"))
|
||||
|
|
||||
|__EOWRAPPER__
|
||||
""".stripMargin(),
|
||||
returnStdout: true).trim()
|
||||
|
||||
if(_GIT_BRANCH=="master") {
|
||||
if(sh(returnStdout: true, script: "git tag --points-at HEAD").trim().isEmpty()) {
|
||||
@@ -573,6 +598,7 @@ pipeline {
|
||||
|from simple_rest_client.api import API
|
||||
|from simple_rest_client.resource import Resource
|
||||
|
|
||||
|
|
||||
|try:
|
||||
| from pygitversionhelper import gitversionhelper
|
||||
|except ImportError:
|
||||
@@ -619,6 +645,13 @@ pipeline {
|
||||
|ReleaseContent = "${_ReleaseContent_Title}" + "\\n" \\
|
||||
| + "\\n" \\
|
||||
| + "Reference documentation: [mkdocs page](https://chacha.ddns.net/mkdocs-web/${_PROJECT_USER_NAME}/${PY_PROJECT_NAME}/${_GIT_BRANCH}/${PY_PROJECT_VERSION_STRIPPED}/) "
|
||||
|
|
||||
|Changelog='''${CHANGELOG}'''
|
||||
|
|
||||
|ReleaseContent = ReleaseContent + "\\n"+ "\\n"+ "## Changelog:\\n" + Changelog
|
||||
|
|
||||
|if not Changelog:
|
||||
| ReleaseContent = ReleaseContent + "code/project maintainance"
|
||||
|
|
||||
|data={
|
||||
| "body": ReleaseContent,
|
||||
|
||||
@@ -19,7 +19,6 @@ from radon.cli import Config
|
||||
from radon.cli.harvest import CCHarvester, HCHarvester, MIHarvester
|
||||
|
||||
from .helper_base import helper_withresults_base
|
||||
from pprint import pprint
|
||||
|
||||
|
||||
class complexity_check(helper_withresults_base):
|
||||
|
||||
@@ -163,15 +163,13 @@ class gitversionhelper: # pylint: disable=too-few-public-methods
|
||||
the commit message
|
||||
"""
|
||||
current_commit_id = cls.getLast(**kwargs)
|
||||
print(f"current_commit_id = {current_commit_id}")
|
||||
tag_commit_id = cls.getFromTag(tag)
|
||||
print(f"tag_commit_id = {tag_commit_id}")
|
||||
|
||||
str_cmd: str
|
||||
if ("same_branch" in kwargs) and (kwargs["same_branch"] is True):
|
||||
str_cmd = f"git rev-list --first-parent --ancestry-path {tag_commit_id}..{current_commit_id}"
|
||||
str_cmd = f"git rev-list --first-parent {tag_commit_id}..{current_commit_id}" # ok
|
||||
else:
|
||||
str_cmd = f"git rev-list --ancestry-path {tag_commit_id}..{current_commit_id}"
|
||||
str_cmd = f"git rev-list {tag_commit_id}..{current_commit_id}" # ok
|
||||
|
||||
if ("ignore_merged" in kwargs) and (kwargs["ignore_merged"] is True):
|
||||
str_cmd = str_cmd + " --no-merges" # ok
|
||||
|
||||
Reference in New Issue
Block a user