-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from bigbluebutton/release
Build system improvements
- Loading branch information
Showing
6 changed files
with
38 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# This is a tool to convert a semver 2.0.0 compatible version to a format which | ||
# is compatible with both debian packaging tools and - after the transformations | ||
# applied in debian pybuild - python PEP 440. It should generate the same python | ||
# package version as is generated by setuptools_scm's "post-release" scheme. | ||
GIT_TAG=$(git describe --tags --abbrev=0 "$@") | ||
GIT_DESCRIBE=$(git describe --tags --long --dirty=.d$(date +%Y%m%d) "$@") | ||
GIT_EXTRA="${GIT_DESCRIBE#${GIT_TAG}}" | ||
GIT_TAG="${GIT_TAG//-/'~'}" | ||
GIT_TAG="${GIT_TAG//alpha./alpha}" | ||
GIT_TAG="${GIT_TAG//beta./beta}" | ||
GIT_TAG="${GIT_TAG//rc./rc}" | ||
DCH_VERSION="${GIT_TAG}" | ||
|
||
GIT_EXTRA="${GIT_EXTRA#-}" | ||
GIT_DISTANCE="${GIT_EXTRA%%-*}" | ||
GIT_BUILD="${GIT_EXTRA#${GIT_DISTANCE}-}" | ||
GIT_BUILD_HASH="${GIT_BUILD%%.*}" | ||
if [[ $GIT_DISTANCE == 0 ]]; then | ||
GIT_BUILD="${GIT_BUILD#${GIT_BUILD_HASH}}" | ||
GIT_BUILD="${GIT_BUILD#.}" | ||
fi | ||
if [[ -n $GIT_BUILD ]]; then | ||
DCH_VERSION+=".post${GIT_DISTANCE}+${GIT_BUILD}" | ||
elif [[ $GIT_DISTANCE != 0 ]]; then | ||
DCH_VERSION+=".post${GIT_DISTANCE}" | ||
fi | ||
|
||
echo "DCH_VERSION=${DCH_VERSION@Q}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
from setuptools import setup | ||
|
||
setup( | ||
use_scm_version=True, | ||
use_scm_version={"version_scheme": "post-release"}, | ||
) |