Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ docker-kill:
dist-clean:
rm -rf build_*/
rm -rf debian/
rm -rf .ruff_cache/
find -name .mypy_cache | xargs rm -rf
find -name __pycache__ | xargs rm -rf

Expand Down
5 changes: 3 additions & 2 deletions cmake/GetUserverVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ else()
message(STATUS "Git not found")
endif()

set(USERVER_MAJOR_VERSION 2)
set(USERVER_MINOR_VERSION 13-rc)
file(READ ${USERVER_ROOT_DIR}/version.txt VERSION)
string(REGEX MATCH ^[0-9]+ USERVER_MAJOR_VERSION "${VERSION}")
string(REGEX MATCH [-0-9a-z]+$ USERVER_MINOR_VERSION "${VERSION}")

set(USERVER_VERSION "${USERVER_MAJOR_VERSION}.${USERVER_MINOR_VERSION}")
string(REPLACE "-" "_" USERVER_VERSION_STR "${USERVER_VERSION}")
Expand Down
6 changes: 2 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,11 @@ def set_version(self):
self,
os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'cmake/GetUserverVersion.cmake',
'version.txt',
),
)
major_version = re.search(r'set\(USERVER_MAJOR_VERSION (.*)\)', content).group(1).strip()
minor_version = re.search(r'set\(USERVER_MINOR_VERSION (.*)\)', content).group(1).strip()

self.version = f'{major_version}.{minor_version}' # pylint: disable=attribute-defined-outside-init
self.version = content.strip() # pylint: disable=attribute-defined-outside-init

def layout(self):
cmake_layout(self)
Expand Down
15 changes: 11 additions & 4 deletions scripts/generate-debian-directory.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/bin/bash

# Exit on any error and treat unset variables as errors, print all commands
set -euox pipefail
set -euo pipefail

VERSION=${VERSION:-$(cat version.txt)}
DISTRO=${DISTRO:-ubuntu-24.04}
ALL_MODULES=$(ls scripts/docs/en/deps/$DISTRO)
ALL_PACKAGES=$(echo $ALL_MODULES | xargs -n1 | sed 's/.*/libuserver-\0-dev/')
BUILD_DEPENDENCIES=$(cat scripts/docs/en/deps/$DISTRO.md | sed 's/$/,/' | xargs | sed 's/,$//')



# Cleanup
rm -rf debian/

Expand Down Expand Up @@ -82,9 +84,14 @@ done
#
# Generate debian/changelog
cat >debian/changelog <<EOF
userver (1.0-1) UNRELEASED; urgency=medium
userver ($VERSION) unstable; urgency=medium

$(awk '/### Release/ {p++;} {if(p==1) print " "$0;}' <scripts/docs/en/userver/roadmap_and_changelog.md)

* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
-- Vasily Kulikov <segoon@yandex-team.ru> Wed, 20 Aug 2025 22:19:05 +0300
EOF

-- segoon <segoon@unknown> Wed, 20 Aug 2025 22:19:05 +0300
cat <<EOF
debian/{control,changelog,*} are generated.
Now run 'dpkg-buildpackage -S' to build debian source package.
EOF
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.13-rc
Loading