SYNERGY-400 Make build for every merge (#6888)
* SYNERGY-400 Generate build number and create release with tag * SYNERGY-400 Changes for Azure Piplines * Update ChangeLog * SYNERGY-400 Enable not manual build * SYNERGY-400 Removed extra space * SYNERGY-400 Removed extra bracket * SYNERGY-400 Correct conditions * SYNERGY-400 Fix additional condition * SYNERGY-400 Correct to run checks * SYNERGY-400 Fix windows and build number * SYNERGY-400 Fix for old python * SYNERGY-400 Set python version for linux * SYNERGY-400 Fix linux compilation * SYNERGY-400 Fix getting last version for old git * SYNERGY-400 Check python version * SYNERGY-400 Update image for centos8
This commit is contained in:
parent
0dbf288b95
commit
70016e69a2
5 changed files with 6 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
|||
steps:
|
||||
- script: |
|
||||
python3 CI/build_version.py
|
||||
command -v python3 >/dev/null 2>&1 && python3 CI/build_version.py || python CI/build_version.py
|
||||
displayName: 'Update Version.cmake'
|
||||
|
||||
- script: |
|
||||
|
|
|
|||
|
|
@ -11,12 +11,6 @@ steps:
|
|||
python3 CI/build_version.py
|
||||
displayName: 'Update Version.cmake'
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: |
|
||||
python3 CI/build_version.py
|
||||
displayName: 'Update Version.cmake'
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: |
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ steps:
|
|||
displayName: 'Set python version'
|
||||
|
||||
- script: |
|
||||
python3 CI/build_version.py
|
||||
python CI/build_version.py
|
||||
displayName: 'Update Version.cmake'
|
||||
|
||||
- script: |
|
||||
|
|
|
|||
|
|
@ -62,9 +62,6 @@ class Version:
|
|||
result += str(self.build)
|
||||
return result
|
||||
|
||||
def nextBuild(self):
|
||||
self.build.number += 1
|
||||
|
||||
class VersionFile:
|
||||
def __init__(self, file):
|
||||
self.file = file
|
||||
|
|
@ -82,11 +79,10 @@ class VersionFile:
|
|||
|
||||
|
||||
def getVesionFromGit():
|
||||
cmd = ('git tag --sort=-creatordate').split()
|
||||
|
||||
try:
|
||||
proccess = subprocess.run(cmd, stdout=subprocess.PIPE, text=True)
|
||||
versions = proccess.stdout.split()
|
||||
taggedRevision = subprocess.check_output(('git rev-list --tags --max-count=1').split(), universal_newlines=True)
|
||||
cmd = ('git describe --tags ' + taggedRevision).split()
|
||||
versions = subprocess.check_output(cmd, universal_newlines=True).split()
|
||||
print('INFO: Version '+ versions[0] + ' has been read from git')
|
||||
return versions[0]
|
||||
except subprocess.CalledProcessError:
|
||||
|
|
@ -104,6 +100,5 @@ def updateVersionFile(number):
|
|||
|
||||
if __name__ == '__main__':
|
||||
version = Version(getVesionFromGit())
|
||||
version.nextBuild()
|
||||
updateVersionFile(version.build.number)
|
||||
print('INFO: Generate build number is: <' + str(version) + '>')
|
||||
|
|
@ -51,7 +51,7 @@ jobs:
|
|||
packager: rpm
|
||||
name: centos76
|
||||
centos8:
|
||||
image: symless/synergy-core:centos8
|
||||
image: sgad/synergy-core:centos8
|
||||
packager: rpm
|
||||
name: centos8
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue