Skip to content

Commit

Permalink
Merge pull request #1193 from Adyen/develop
Browse files Browse the repository at this point in the history
Release 5.0.0-alpha01 (re-run #2)
  • Loading branch information
jreij committed May 2, 2023
2 parents e048f35 + b63743c commit 4a3e0a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_pr.yml
Expand Up @@ -4,7 +4,7 @@ name: Check PR
on:
pull_request:
branches-ignore:
- 'master'
- 'main'
types: [ opened, synchronize, reopened ]

jobs:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/check_release.yml
Expand Up @@ -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:
Expand All @@ -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
9 changes: 4 additions & 5 deletions 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 ."
Expand All @@ -16,4 +15,4 @@ function release_version() {
echo "$version"
}

release_version
release_version

0 comments on commit 4a3e0a4

Please sign in to comment.