Update ReadMe.md; Add gitPushTags.groovy; Update setup.py;
This commit is contained in:
parent
513cc6230f
commit
a8053afa93
@ -105,7 +105,7 @@ The exit code of auto-semver determines the output.
|
|||||||
|0|Successfully ran auto-semver|
|
|0|Successfully ran auto-semver|
|
||||||
|1|No merge found|
|
|1|No merge found|
|
||||||
|2|Not a main branch|
|
|2|Not a main branch|
|
||||||
|3|No git flow branch name found|
|
|3|No version branch name found|
|
||||||
|128|Unknown error occured|
|
|128|Unknown error occured|
|
||||||
|
|
||||||
#### Flags
|
#### Flags
|
||||||
@ -129,10 +129,6 @@ The `semver_get_version` command returns the version number if the `semver` comm
|
|||||||
|
|
||||||
Replaces `/` with `.` in branch names. For example, `feature/test` becomes `feature.test`
|
Replaces `/` with `.` in branch names. For example, `feature/test` becomes `feature.test`
|
||||||
|
|
||||||
### Commitless Versioning
|
|
||||||
|
|
||||||
Because auto-semver keeps track of the version by looking at the latest git tag, instead of commiting versioned values to the repository, files can be updated upon release.
|
|
||||||
|
|
||||||
### Jenkins Shared Library
|
### Jenkins Shared Library
|
||||||
|
|
||||||
This repository is also home to a Jenkins shared library to assit in running auto-semver.
|
This repository is also home to a Jenkins shared library to assit in running auto-semver.
|
||||||
|
20
README.rst
20
README.rst
@ -1,20 +0,0 @@
|
|||||||
Semantic Versioning
|
|
||||||
===================
|
|
||||||
|
|
||||||
Usage
|
|
||||||
=====
|
|
||||||
|
|
||||||
FULL\_PATH\_TO\_LOCAL\_REPO gives container access to repo to be versioned
|
|
||||||
==========================================================================
|
|
||||||
|
|
||||||
FULL\_PATH\_TO\_SSH\_FOLDER gives container access to ssh keys to be able to push repo
|
|
||||||
======================================================================================
|
|
||||||
|
|
||||||
docker build -t semver . docker run -v
|
|
||||||
FULL\_PATH\_TO\_LOCAL\_REPO:/application\_repo -v
|
|
||||||
FULL\_PATH\_TO\_SSH\_FOLDER:/root/.ssh semver
|
|
||||||
|
|
||||||
after this finishes must go to FULL\_PATH\_TO\_LOCAL\_REPO and push yourself
|
|
||||||
============================================================================
|
|
||||||
|
|
||||||
git push origin develop git push origin --tags
|
|
4
setup.py
4
setup.py
@ -17,7 +17,7 @@ from os import path
|
|||||||
here = path.abspath(path.dirname(__file__))
|
here = path.abspath(path.dirname(__file__))
|
||||||
|
|
||||||
# Get the long description from the README file
|
# Get the long description from the README file
|
||||||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
|
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
def read(*parts):
|
def read(*parts):
|
||||||
@ -46,7 +46,7 @@ setup(
|
|||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
|
|
||||||
# The project's main homepage.
|
# The project's main homepage.
|
||||||
url='https://git-codecommit.us-east-1.amazonaws.com/v1/repos/auto-semver',
|
url='https://github.com/RightBrain-Networks/auto-semver',
|
||||||
|
|
||||||
# Author details
|
# Author details
|
||||||
author='RightBrain Networks',
|
author='RightBrain Networks',
|
||||||
|
18
vars/gitPushTags.groovy
Normal file
18
vars/gitPushTags.groovy
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes tags to a repo
|
||||||
|
*
|
||||||
|
* @param creds The Jenkins Git credentials to use.
|
||||||
|
*/
|
||||||
|
|
||||||
|
def call(creds) {
|
||||||
|
|
||||||
|
withCredentials([usernamePassword(credentialsId: creds, usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) {
|
||||||
|
def gitOrigin = sh(script: "git remote", returnStdout: true).trim()
|
||||||
|
// Need to remove the protocol to add in user name and host
|
||||||
|
def gitHost = sh(script: "git remote get-url ${gitOrigin}", returnStdout: true).trim().replaceFirst('https://','')
|
||||||
|
// Push tags to branch
|
||||||
|
sh("git push https://${env.GIT_USERNAME}:${env.GIT_PASSWORD}@${gitHost} --tags")
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user