initial public release

This commit is contained in:
Brian Caswell
2020-09-18 12:21:04 -04:00
parent 9c3aa0bdfb
commit d3a0b292e6
387 changed files with 43810 additions and 28 deletions

View File

@ -0,0 +1,31 @@
#!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
from typing import Dict
from memoization import cached
from onefuzztypes.responses import Version
from .__version__ import __version__
@cached
def read_local_file(filename: str) -> str:
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), filename)
if os.path.exists(path):
with open(path, "r") as handle:
return handle.read().strip()
else:
return "UNKNOWN"
def versions() -> Dict[str, Version]:
entry = Version(
git=read_local_file("git.version"),
build=read_local_file("build.id"),
version=__version__,
)
return {"onefuzz": entry}