Commit b1076a14 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

update ExampleTimeSeries.csv

parent 6b879b44
Pipeline #11328 failed
......@@ -31,7 +31,8 @@ pipelines:
- python3 scripts/setup_repository.py
- python3 -m coverage run -m unittest discover -s tests
- python3 -m coverage report
# build and upload plugin to download section
- python3 scripts/create_plugin.py -z timeseriesviewerplugin.$(BITBUCKET_BRANCH).lastbuild.zip
definitions:
caches:
qgisresourcecache: /opt/atlassian/pipelines/agent/build/qgisresources
......@@ -87,7 +87,8 @@ def scantree(path, pattern=re.compile(r'.$')) -> typing.Iterator[pathlib.Path]:
def create_plugin(include_testdata: bool = False,
include_qgisresources: bool = False,
zipfilename: str = None) -> str:
zipfilename: str = None,
latest: bool = False) -> str:
assert (DIR_REPO / '.git').is_dir()
DIR_DEPLOY = DIR_REPO / 'deploy'
......@@ -107,12 +108,19 @@ def create_plugin(include_testdata: bool = False,
BUILD_NAME = re.sub(r'[\\/]', '_', BUILD_NAME)
PLUGIN_DIR = DIR_DEPLOY / 'timeseriesviewerplugin'
if isinstance(zipfilename, str) and len(zipfilename) > 0:
if not zipfilename.endswith('.zip'):
zipfilename += '.zip'
PLUGIN_ZIP = DIR_DEPLOY / zipfilename
if latest:
branch = currentBranch
branch = re.sub(r'[:-]', '', branch)
branch = re.sub(r'[\\/]', '_', branch)
PLUGIN_ZIP = DIR_DEPLOY / 'timeseriesviewerplugin.{}.latest.zip'.format(branch)
else:
PLUGIN_ZIP = DIR_DEPLOY / 'timeseriesviewerplugin.{}.zip'.format(BUILD_NAME)
if isinstance(zipfilename, str) and len(zipfilename) > 0:
if not zipfilename.endswith('.zip'):
zipfilename += '.zip'
PLUGIN_ZIP = DIR_DEPLOY / zipfilename
else:
PLUGIN_ZIP = DIR_DEPLOY / 'timeseriesviewerplugin.{}.zip'.format(BUILD_NAME)
if PLUGIN_DIR.is_dir():
shutil.rmtree(PLUGIN_DIR)
......@@ -273,9 +281,17 @@ if __name__ == "__main__":
type=str,
help='final path of generated zipfile')
parser.add_argument('-l', '--latest',
required=False,
help='Name the output zip like timeseriesviewer.<branch name>.latest.zip, e.g. for generic uploads',
default=None,
action='store_true')
args = parser.parse_args()
path = create_plugin(include_qgisresources=args.qgisresources,
zipfilename=args.zipfilename)
zipfilename=args.zipfilename,
latest=args.latest)
print('EOTSV_ZIP={}'.format(path))
exit(0)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment