-
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.
- Loading branch information
Showing
12 changed files
with
143 additions
and
1,043 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import os | ||
import re | ||
import shlex | ||
|
||
from tito.common import info_out, run_command | ||
from tito.tagger import VersionTagger | ||
|
||
|
||
class Tagger(VersionTagger): | ||
def _bump_version(self, release=False, zstream=False): | ||
version = super()._bump_version().split('-', maxsplit=1)[0] | ||
pattern = re.compile(r'(?<=^m4_define\(\[faf_version\], \[)' | ||
r'.*' | ||
r'(?=\]\))') | ||
|
||
with FileInput(files='configure.ac', inplace=True) as input: | ||
for line in input: | ||
if pattern.search(line): | ||
line = pattern.sub(version, line) | ||
|
||
print(line, end='') | ||
|
||
return version | ||
|
||
def _tag_release(self): | ||
version = self._bump_version() | ||
|
||
self._check_tag_does_not_exist(version) | ||
self._clear_package_metadata() | ||
|
||
metadata_file = os.path.join(self.rel_eng_dir, 'packages', self.project_name) | ||
|
||
with open(metadata_file, 'w') as file: | ||
file.write('%s %s\n' % (version, self.relative_project_dir)) | ||
|
||
files = [ | ||
metadata_file, | ||
os.path.join(self.full_project_dir, self.spec_file_name), | ||
'configure.ac', | ||
] | ||
run_command('git add -- %s' % (' '.join([shlex.quote(file) for file in files]))) | ||
|
||
message = 'Release version %s' % (version) | ||
|
||
run_command('git commit --message="%s"' % message) | ||
run_command('git tag --message="%s" %s' % (message, version)) | ||
|
||
info_out('%s tagged' % version) |
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,3 @@ | ||
the .tito/packages directory contains metadata files | ||
named after their packages. Each file has the latest tagged | ||
version and the project's relative directory. |
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,3 @@ | ||
[copr] | ||
releaser = tito.release.CoprReleaser | ||
project_name = @abrt/faf-el8 |
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,5 @@ | ||
[buildconfig] | ||
builder = tito.builder.Builder | ||
tagger = abrt.Tagger | ||
lib_dir = .tito/custom | ||
tag_format = {version} |
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 |
---|---|---|
@@ -1,55 +1,6 @@ | ||
#!/bin/sh | ||
|
||
print_help() | ||
{ | ||
cat << EOH | ||
Prepares the source tree for configuration | ||
Usage: | ||
autogen.sh [sydeps [--install]] | ||
Options: | ||
sysdeps prints out all dependencies | ||
--install install all dependencies ('sudo dnf install \$DEPS') | ||
EOH | ||
} | ||
|
||
build_depslist() | ||
{ | ||
PACKAGE=$1 | ||
TEMPFILE=$(mktemp -u --suffix=.spec) | ||
sed 's/@PACKAGE_VERSION@/1/' < $PACKAGE.spec.in | sed 's/@.*@//' > $TEMPFILE | ||
rpmspec -P $TEMPFILE | grep "^\(Build\)\?Requires:" | \ | ||
tr -s " " | tr "," "\n" | cut -f2- -d " " | \ | ||
grep -v "^"$PACKAGE | sort -u | sed -E 's/^(.*) (.*)$/"\1 \2"/' | tr \" \' | ||
rm $TEMPFILE | ||
} | ||
|
||
case "$1" in | ||
"--help"|"-h") | ||
print_help | ||
exit 0 | ||
;; | ||
"sysdeps") | ||
DEPS_LIST=$( build_depslist faf) | ||
|
||
if [ "$2" == "--install" ]; then | ||
set -x verbose | ||
eval sudo dnf install --setopt=strict=0 $DEPS_LIST | ||
set +x verbose | ||
else | ||
echo $DEPS_LIST | ||
fi | ||
exit 0 | ||
;; | ||
*) | ||
./gen-version | ||
autoreconf --install --force | ||
if [ -z "$NOCONFIGURE" ]; then | ||
./configure "$@" | ||
fi | ||
;; | ||
esac | ||
|
||
autoreconf --install --force | ||
if [ -z "$NOCONFIGURE" ]; then | ||
./configure "$@" | ||
fi |
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 |
---|---|---|
|
@@ -9,8 +9,10 @@ AC_DEFUN([FAF_PARSE_WITH], | |
fi | ||
m4_popdef([FAF_UC_PACKAGE])]) | ||
|
||
m4_define([faf_version], [2.2.0]) | ||
|
||
AC_INIT([faf], | ||
m4_esyscmd([cat ./faf-version]), | ||
[faf_version], | ||
[[email protected]]) | ||
|
||
AM_INIT_AUTOMAKE([foreign -Wall tar-ustar]) | ||
|
@@ -39,14 +41,14 @@ AM_CONDITIONAL(HAVE_SYSTEMD, false) | |
fi | ||
|
||
AC_CONFIG_FILES([ | ||
faf.spec | ||
Makefile | ||
config/Makefile | ||
config/plugins/Makefile | ||
config/templates/Makefile | ||
src/Makefile | ||
src/bin/Makefile | ||
src/pyfaf/Makefile | ||
src/pyfaf/__init__.py | ||
src/pyfaf/actions/Makefile | ||
src/pyfaf/bugtrackers/Makefile | ||
src/pyfaf/celery_tasks/Makefile | ||
|
@@ -61,6 +63,7 @@ AC_CONFIG_FILES([ | |
src/pyfaf/storage/fixtures/sql/Makefile | ||
src/pyfaf/utils/Makefile | ||
src/schema/Makefile | ||
src/schema/setup.py | ||
src/webfaf/Makefile | ||
src/webfaf/blueprints/Makefile | ||
src/webfaf/static/Makefile | ||
|
Oops, something went wrong.