Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .azdo/ci-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ steps:

- script: |
mkdir -p dist
for dir in libraries/*; do
if [ -f "$dir/pyproject.toml" ]; then
echo $(PackageVersion) > "$dir/VERSION.txt"
fi
done
for dir in libraries/*; do
if [ -f "$dir/pyproject.toml" ]; then
(cd "$dir" && python -m build --outdir ../../dist)
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-activity/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-authentication-msal/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-copilotstudio-client/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-hosting-aiohttp/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-hosting-core/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-hosting-fastapi/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-hosting-teams/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-storage-blob/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down
10 changes: 8 additions & 2 deletions libraries/microsoft-agents-storage-cosmos/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import environ
from os import environ, path
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")
# Try to read from VERSION.txt file first, fall back to environment variable
version_file = path.join(path.dirname(__file__), "VERSION.txt")
if path.exists(version_file):
with open(version_file, "r", encoding="utf-8") as f:
package_version = f.read().strip()
else:
package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
Expand Down