jason810496 commented on code in PR #67826:
URL: https://github.com/apache/airflow/pull/67826#discussion_r3332936339
##########
.github/workflows/publish-docs-to-s3.yml:
##########
@@ -345,8 +345,53 @@ jobs:
if-no-files-found: 'error'
overwrite: 'true'
+ build-java-sdk-docs:
+ needs: [build-info]
+ timeout-minutes: 30
+ name: "Build Java SDK Javadoc"
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ steps:
+ - name: "Checkout ${{ inputs.ref }}"
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #
v6.0.2
+ with:
+ persist-credentials: false
+ ref: ${{ inputs.ref }}
+ # Keep these in sync:
+ # - jvmTarget, languageVersion, and sourceCompatibility in
java-sdk/build.gradle.kts
+ # - TEMURIN_VERSION in scripts/docker/install_jdk.sh
+ # - JAVA_VERSION in .github/workflows/ci-amd.yml and
.github/workflows/ci-arm.yml
+ # - java-version in .github/workflows/codeql-analysis.yml and
.github/workflows/publish-docs-to-s3.yml
+ - name: Setup Java
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 #
v5.2.0
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ - name: Build Java SDK Javadoc
+ working-directory: ./java-sdk
+ run: ./gradlew :sdk:dokkaGeneratePublicationHtml --no-daemon
+ - name: Stage Dokka output for publish pipeline
+ run: |
+ AIRFLOW_VERSION=$(python3 -c "
+ import re, pathlib
+ src =
pathlib.Path('airflow-core/src/airflow/__init__.py').read_text()
+ print(re.search(r\"__version__ = '(.+?)'\", src).group(1))
+ ")
Review Comment:
I run this part myself and encounter AttributeError as we're using double
quote: `__version__ = "3.3.0"`
```
AIRFLOW_VERSION=$(python3 -c "
import re, pathlib
src = pathlib.Path('airflow-core/src/airflow/__init__.py').read_text()
print(re.search(r\"__version__ = '(.+?)'\", src).group(1))
")
Traceback (most recent call last):
File "<string>", line 4, in <module>
AttributeError: 'NoneType' object has no attribute 'group'
```
How about using the `get_airflow_version` utility from breeze?
https://github.com/apache/airflow/blob/691b672d2d6a710ef67e77faf3f8482f68e28357/dev/breeze/src/airflow_breeze/global_constants.py#L665-L675
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]