Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dtu-10mw-rwt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
HAWC Reference Models
dtu-10mw-rwt
Merge requests
!4
Merge debugging changes in make_zip back into develop
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Merge debugging changes in make_zip back into develop
make_zip
into
develop
Overview
0
Commits
4
Pipelines
2
Changes
2
Merged
Jenni Rinker
requested to merge
make_zip
into
develop
4 years ago
Overview
0
Commits
4
Pipelines
2
Changes
2
Expand
0
0
Merge request reports
Viewing commit
7e7af9de
Prev
Next
Show latest version
2 files
+
13
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
7e7af9de
put tag name in zip name
· 7e7af9de
Jenni Rinker
authored
4 years ago
utils/prepare_zip_file.py
+
12
−
9
Options
@@ -4,14 +4,17 @@
import
os
import
shutil
import
subprocess
import
sys
from
refutils
import
(
turb_to_hs2
,
turb_to_step
,
delete_dlls
,
clone_repo
,
get_repo_info
)
if
__name__
==
'
__main__
'
:
# get ref name
ci_ref
=
sys
.
argv
[
1
]
# script inputs
mod_dir
=
'
../dtu-10mw-rwt/
'
# must end with slash
zip_name
=
'
../dtu-10mw-rwt
'
zip_name
=
f
'
../dtu-10mw-rwt
_
{
ci_ref
}
'
basename
=
'
DTU_10MW_RWT
'
dll_git_url
=
'
https://gitlab.windenergy.dtu.dk/OpenLAC/control-binary/control-win32.git
'
dll_branch
=
'
ref_models
'
@@ -54,14 +57,14 @@ if __name__ == '__main__':
#subprocess.run(['rmdir', '/s', '/q', 'control-win32'], shell=True, check=True)
# write the git branch and commit to file
url
,
branch
,
commit
,
date
=
get_repo_info
()
with
open
(
mod_dir
+
'
git_version.txt
'
,
'
w
'
)
as
f
:
f
.
write
(
f
'
Git info for
{
basename
}
zip file
\n
'
)
f
.
write
(
'
------------------------------------
\n
'
)
f
.
write
(
'
Automatically generated using CI on following repo.
\n\n
'
)
f
.
write
(
f
'
Repo url:
{
url
}
\n
'
)
f
.
write
(
f
'
Branch:
{
branch
}
\n
'
)
f
.
write
(
f
'
Commit:
{
commit
}
made on
{
date
}
\n
'
)
#
url, branch, commit, date = get_repo_info()
#
with open(mod_dir + 'git_version.txt', 'w') as f:
#
f.write(f'Git info for {basename} zip file\n')
#
f.write('------------------------------------\n')
#
f.write('Automatically generated using CI on following repo.\n\n')
#
f.write(f'Repo url: {url}\n')
#
f.write(f'Branch: {branch}\n')
#
f.write(f'Commit: {commit} made on {date}\n')
# ======= make the archive =======
shutil
.
make_archive
(
mod_dir
,
'
zip
'
,
zip_name
)
Loading