Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show alidist info on version subcmd #892

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 aliBuild
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from alibuild_helpers.log import info, debug, logger, error
from alibuild_helpers.utilities import detectArch
from alibuild_helpers.build import doBuild
from alibuild_helpers.git import git


def doMain(args, parser):
Expand Down Expand Up @@ -60,6 +61,10 @@
if args.action == "version" or args.action == None:
print("aliBuild version: {version} ({arch})".format(
version=__version__ or "unknown", arch=args.architecture or "unknown"))
alidist = os.path.join(os.getcwd(), "alidist")
if os.path.exists(alidist):
alidist_version = git(("rev-parse", "--short", "HEAD"), directory=alidist)
print(f"alidist version: {alidist_version}")

Check warning on line 67 in aliBuild

View check run for this annotation

Codecov / codecov/patch

aliBuild#L66-L67

Added lines #L66 - L67 were not covered by tests
sys.exit(0)

if args.action == "doctor":
Expand Down
Loading