Skip to content
Snippets Groups Projects
Commit 7e7af9de authored by Jenni Rinker's avatar Jenni Rinker
Browse files

put tag name in zip name

parent 751926ae
No related branches found
No related tags found
1 merge request!4Merge debugging changes in make_zip back into develop
Pipeline #15305 failed
......@@ -3,7 +3,7 @@ make_32bit_zip:
script:
- pip install git+https://gitlab.windenergy.dtu.dk/hawc-reference-models/reference-utilities.git
- cd utils
- python3 prepare_zip_file.py
- python3 prepare_zip_file.py $CI_COMMIT_REF_NAME
artifacts:
paths:
- dtu-10mw-rwt.zip
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment