forked from release-engineering/resultsdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drops spec file and setup.py.
- Loading branch information
Showing
12 changed files
with
1,740 additions
and
354 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 was deleted.
Oops, something went wrong.
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,8 @@ | ||
#!/bin/bash | ||
# ENTRYPOINT for the container. | ||
# Activates virtualenv before running any commands. | ||
set -e | ||
|
||
# shellcheck disable=SC1091 | ||
. /venv/bin/activate | ||
exec "$@" |
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,42 @@ | ||
#!/bin/bash | ||
|
||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
# Prints the current version based on the current git revision. | ||
|
||
set -e | ||
|
||
if [[ -n "$GITHUB_SHA" ]]; then | ||
if [[ $GITHUB_REF =~ ^ref/tags/ ]]; then | ||
echo "${GITHUB_REF#refs/tags/}" | ||
else | ||
last_version=$(poetry version --short) | ||
echo "$last_version+git.${GITHUB_SHA:0:7}" | ||
fi | ||
exit | ||
fi | ||
|
||
if [ "$(git tag | wc -l)" -eq 0 ] ; then | ||
# never been tagged since the project is just starting out | ||
lastversion="0.0" | ||
revbase="" | ||
else | ||
lasttag="$(git describe --abbrev=0 HEAD)" | ||
lastversion="$lasttag" | ||
revbase="^$lasttag" | ||
fi | ||
if [ "$(git rev-list $revbase HEAD | wc -l)" -eq 0 ] ; then | ||
# building a tag | ||
version="$lastversion" | ||
else | ||
# git builds count as a pre-release of the next version | ||
version="$lastversion" | ||
version="${version%%[a-z]*}" # strip non-numeric suffixes like "rc1" | ||
# increment the last portion of the version | ||
version="${version%.*}.$((${version##*.} + 1))" | ||
commitcount=$(git rev-list $revbase HEAD | wc -l) | ||
commitsha=$(git rev-parse --short HEAD) | ||
version="${version}.dev${commitcount}+git.${commitsha}" | ||
fi | ||
|
||
echo $version |
Oops, something went wrong.