-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
967 additions
and
290 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.git/ | ||
.tox/ | ||
.*_cache/ | ||
__pycache__/ | ||
dist/ | ||
htmlcov/ | ||
*.egg-info/ | ||
Dockerfile |
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,9 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ -z "$GREENWAVE_CONFIG"]; then | ||
if [ -f /etc/greenwave/settings.py ]; then | ||
export GREENWAVE_CONFIG=/etc/greenwave/settings.py | ||
elif [ -f /src/conf/settings.py ]; then | ||
export GREENWAVE_CONFIG=/src/conf/settings.py | ||
else | ||
export GREENWAVE_CONFIG=/src/conf/settings.py.example | ||
fi | ||
fi | ||
|
||
if [ -z "$GREENWAVE_SUBJECT_TYPES_DIR"]; then | ||
if [ -d /etc/greenwave/subject_types ]; then | ||
export GREENWAVE_SUBJECT_TYPES_DIR=/etc/greenwave/subject_types | ||
else | ||
export GREENWAVE_SUBJECT_TYPES_DIR=/src/conf/subject_types | ||
fi | ||
fi | ||
|
||
if [ -z "$GREENWAVE_POLICIES_DIR"]; then | ||
if [ -d /etc/greenwave/policies ]; then | ||
export GREENWAVE_POLICIES_DIR=/etc/greenwave/policies | ||
else | ||
export GREENWAVE_POLICIES_DIR=/src/conf/policies | ||
fi | ||
fi | ||
|
||
. /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,44 @@ | ||
#!/bin/bash | ||
|
||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
# Prints the current version based on the current git revision. | ||
|
||
set -e | ||
|
||
name=greenwave | ||
|
||
if [[ -n "$GITHUB_SHA" ]]; then | ||
if [[ $GITHUB_REF =~ ^ref/tags/$name- ]]; then | ||
echo "${GITHUB_REF#refs/tags/$name-}" | ||
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##${name}-}" | ||
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.