Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPSD Computational Science
mpsd-software-manager
Commits
ab763703
Commit
ab763703
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
create log_folder for non info only commands
parent
d99dbd72
No related branches found
No related tags found
1 merge request
!29
Restructure log location
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mpsd-software-environment.py
+11
-6
11 additions, 6 deletions
mpsd-software-environment.py
with
11 additions
and
6 deletions
mpsd-software-environment.py
+
11
−
6
View file @
ab763703
...
@@ -792,8 +792,8 @@ def main():
...
@@ -792,8 +792,8 @@ def main():
# Get machine configs
# Get machine configs
os
.
environ
.
get
(
"
MPSD_OS
"
,
"
UNKNOWN_OS
"
)
os
.
environ
.
get
(
"
MPSD_OS
"
,
"
UNKNOWN_OS
"
)
mpsd_microarch
=
os
.
environ
.
get
(
"
MPSD_MICROARCH
"
,
"
UNKNOWN_MICROARCH
"
)
mpsd_microarch
=
get_native_microarchitecture
(
)
#
release `dev` in script_dir/dev-23a
#
target dir is the place where this script exists. the
script_dir
=
Path
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)))
script_dir
=
Path
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)))
mpsd_release
=
args
.
release
mpsd_release
=
args
.
release
# parse logging first
# parse logging first
...
@@ -801,13 +801,18 @@ def main():
...
@@ -801,13 +801,18 @@ def main():
installer_log_name
,
build_log_name
=
create_log_file_names
(
installer_log_name
,
build_log_name
=
create_log_file_names
(
mpsd_release
=
mpsd_release
,
mpsd_microarch
=
mpsd_microarch
,
action
=
args
.
action
mpsd_release
=
mpsd_release
,
mpsd_microarch
=
mpsd_microarch
,
action
=
args
.
action
)
)
installer_log_file
=
(
log_folder
=
script_dir
/
mpsd_release
/
mpsd_microarch
/
"
logs
"
script_dir
/
mpsd_release
/
mpsd_microarch
/
"
logs
"
/
installer_log_name
# if the log_folder dosent exist, dont log this message if
)
# the command is a info-only command
if
not
os
.
path
.
exists
(
log_folder
):
if
args
.
action
not
in
[
"
status
"
,
"
available
"
]:
os
.
makedirs
(
log_folder
)
installer_log_file
=
log_folder
/
installer_log_name
else
:
installer_log_file
=
None
set_up_logging
(
args
.
loglevel
,
installer_log_file
)
set_up_logging
(
args
.
loglevel
,
installer_log_file
)
# target dir is the place where this script exists. the
# Check the command and run related function
# Check the command and run related function
if
args
.
action
==
"
remove
"
:
if
args
.
action
==
"
remove
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment