forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbundle_location.py
More file actions
25 lines (19 loc) 路 809 Bytes
/
Copy pathbundle_location.py
File metadata and controls
25 lines (19 loc) 路 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
import abc
class BundleLocation(abc.ABC):
def __init__(self, path: str, filename: str, distribution: str) -> None:
self.path = path
self.filename = filename
self.distribution = distribution
@abc.abstractmethod
def join(self, *args: str) -> str:
pass
def get_build_location(self, target_name: str) -> str:
return self.join(self.distribution, "builds", self.filename, target_name)
def get_bundle_location(self, target_name: str) -> str:
return self.join(self.distribution, "dist", self.filename, target_name)