fix(ingest): use epoch 1 for dev build versions (#8824)

This commit is contained in:
Harshal Sheth 2023-09-12 13:11:01 -07:00 committed by GitHub
parent 303a2d0863
commit f7fee743bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 deletions

View File

@ -20,7 +20,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-11-jdk
COPY . /datahub-src COPY . /datahub-src
ARG RELEASE_VERSION ARG RELEASE_VERSION
RUN cd /datahub-src/metadata-ingestion && \ RUN cd /datahub-src/metadata-ingestion && \
sed -i.bak "s/__version__ = \"0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py && \ sed -i.bak "s/__version__ = \"1!0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py && \
cat src/datahub/__init__.py && \ cat src/datahub/__init__.py && \
cd ../ && \ cd ../ && \
./gradlew :metadata-ingestion:installAll ./gradlew :metadata-ingestion:installAll

View File

@ -11,8 +11,8 @@ COPY ./metadata-ingestion-modules/airflow-plugin /datahub-ingestion/airflow-plug
ARG RELEASE_VERSION ARG RELEASE_VERSION
WORKDIR /datahub-ingestion WORKDIR /datahub-ingestion
RUN sed -i.bak "s/__version__ = \"0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py && \ RUN sed -i.bak "s/__version__ = \"1!0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py && \
sed -i.bak "s/__version__ = \"0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" airflow-plugin/src/datahub_airflow_plugin/__init__.py && \ sed -i.bak "s/__version__ = \"1!0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" airflow-plugin/src/datahub_airflow_plugin/__init__.py && \
cat src/datahub/__init__.py && \ cat src/datahub/__init__.py && \
chown -R datahub /datahub-ingestion chown -R datahub /datahub-ingestion

View File

@ -9,7 +9,7 @@ COPY ./metadata-ingestion /datahub-ingestion
ARG RELEASE_VERSION ARG RELEASE_VERSION
WORKDIR /datahub-ingestion WORKDIR /datahub-ingestion
RUN sed -i.bak "s/__version__ = \"0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py && \ RUN sed -i.bak "s/__version__ = \"1!0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py && \
cat src/datahub/__init__.py && \ cat src/datahub/__init__.py && \
chown -R datahub /datahub-ingestion chown -R datahub /datahub-ingestion

View File

@ -13,7 +13,7 @@ MODULE=datahub_airflow_plugin
python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"' python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"'
if [[ ${RELEASE_VERSION:-} ]]; then if [[ ${RELEASE_VERSION:-} ]]; then
# Replace version with RELEASE_VERSION env variable # Replace version with RELEASE_VERSION env variable
sed -i.bak "s/__version__ = \"0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/${MODULE}/__init__.py sed -i.bak "s/__version__ = \"1!0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/${MODULE}/__init__.py
else else
vim src/${MODULE}/__init__.py vim src/${MODULE}/__init__.py
fi fi

View File

@ -1,6 +1,6 @@
# Published at https://pypi.org/project/acryl-datahub/. # Published at https://pypi.org/project/acryl-datahub/.
__package_name__ = "acryl-datahub-airflow-plugin" __package_name__ = "acryl-datahub-airflow-plugin"
__version__ = "0.0.0.dev0" __version__ = "1!0.0.0.dev0"
def is_dev_mode() -> bool: def is_dev_mode() -> bool:

View File

@ -11,7 +11,7 @@ fi
python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"' python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"'
if [[ ${RELEASE_VERSION:-} ]]; then if [[ ${RELEASE_VERSION:-} ]]; then
# Replace version with RELEASE_VERSION env variable # Replace version with RELEASE_VERSION env variable
sed -i.bak "s/__version__ = \"0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py sed -i.bak "s/__version__ = \"1!0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py
else else
vim src/datahub/__init__.py vim src/datahub/__init__.py
fi fi

View File

@ -3,7 +3,7 @@ import warnings
# Published at https://pypi.org/project/acryl-datahub/. # Published at https://pypi.org/project/acryl-datahub/.
__package_name__ = "acryl-datahub" __package_name__ = "acryl-datahub"
__version__ = "0.0.0.dev0" __version__ = "1!0.0.0.dev0"
def is_dev_mode() -> bool: def is_dev_mode() -> bool: