diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml index 8028f51d88..68bf4dd447 100644 --- a/.github/workflows/check_pr.yml +++ b/.github/workflows/check_pr.yml @@ -4,7 +4,7 @@ name: Check PR on: pull_request: branches-ignore: - - 'master' + - 'main' types: [ opened, synchronize, reopened ] jobs: diff --git a/.github/workflows/check_release.yml b/.github/workflows/check_release.yml index e602107c41..205a12cb26 100644 --- a/.github/workflows/check_release.yml +++ b/.github/workflows/check_release.yml @@ -9,11 +9,16 @@ on: jobs: check-release: + # https://github.com/actions/virtual-environments/ runs-on: ubuntu-latest steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # https://github.com/marketplace/actions/checkout - uses: actions/checkout@v3 + # Setup Java 11 + # https://github.com/marketplace/actions/setup-java-jdk - name: Set up JDK 11 uses: actions/setup-java@v3 with: @@ -24,7 +29,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew + # Run gradlew check - name: Gradle check run: ./gradlew check --no-daemon - - # TODO: add more tests diff --git a/scripts/version_name.sh b/scripts/version_name.sh index 499dc67299..59b533ba9b 100755 --- a/scripts/version_name.sh +++ b/scripts/version_name.sh @@ -1,12 +1,11 @@ #!/bin/bash function release_version() { - local build_file="${GITHUB_WORKSPACE}/build.gradle" - local version_name_key="ext.version_name" + local build_file="${GITHUB_WORKSPACE}/dependencies.gradle" + local version_name_key="version_name" local version_name_regex="^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(-(alpha|beta|rc)[0-9]{2}){0,1}$" - local version - version=$(grep "${version_name_key}" "${build_file}" | sed -E "s/.*${version_name_key}[[:space:]]*=[[:space:]]*[\"\'](.*)[\"\'].*/\1/") + local version=$(sed -n "s/.*${version_name_key}[[:space:]]*=[[:space:]]*[\"\']\(.*\)[\"\'].*/\1/p" ${build_file}) if [[ ! ${version} =~ ${version_name_regex} ]]; then echo "Error: invalid version name [$version], please validate that [$version_name_key] at [$build_file] follows regex $version_name_regex ." @@ -16,4 +15,4 @@ function release_version() { echo "$version" } -release_version \ No newline at end of file +release_version