Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kdewald committed Nov 5, 2024
1 parent b5fff82 commit 5d19f50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/ci_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
- name: Clone Repository
- name: Clone Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
miscs: ${{ steps.filter.outputs.miscs }}
changes: ${{ steps.filter.outputs.changes }}
steps:
- name: Clone Repository
- name: Clone Repository
uses: actions/checkout@v4
- name: Detect file changes
uses: dorny/paths-filter@v3
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
# This job is used to dynamically generate the build matrix of 'build' job in 'ci_linux.yml'.
# The output variable 'values' is a list of strings: 'simpledbus', 'simplebluez' and 'simpleble'.
# This is not inside pre-job because 'changes' variable is set by dorny/paths-filter to ALL the filters
# This is not inside pre-job because 'changes' variable is set by dorny/paths-filter to ALL the filters
# that match, so we need to have a job with only these three filters.
# Note that the filters are defined in a way that makes each of them depend on the previous one.
# If in main branch, all libraries are listed in the output even if there are no matching changes.
Expand All @@ -119,7 +119,7 @@ jobs:
outputs:
values: ${{ github.ref == 'refs/heads/main' && '["simpledbus","simplebluez","simpleble"]' || steps.filter.outputs.changes }}
steps:
- name: Clone Repository
- name: Clone Repository
uses: actions/checkout@v4
- name: Detect file changes
uses: dorny/paths-filter@v3
Expand All @@ -134,12 +134,6 @@ jobs:
simpleble: &simpleble
- *simplebluez
- 'simpleble/**'
- name: Debug Output
run: |
echo "Current branch: ${{ github.ref }}"
echo "Is main branch? ${{ github.ref == 'refs/heads/main' }}"
echo "Path filter changes: ${{ steps.filter.outputs.changes }}"
echo "Final libraries output: ${{ github.ref == 'refs/heads/main' && '["simpledbus","simplebluez","simpleble"]' || steps.filter.outputs.changes }}"
lint:
needs: pre_job
Expand All @@ -153,7 +147,7 @@ jobs:
needs.pre_job.outputs.should_skip != 'true' &&
(needs.changes.outputs.docs == 'true' || github.ref == 'refs/heads/main')
uses: ./.github/workflows/ci_docs.yml

windows:
needs: [pre_job, changes]
if: |
Expand Down Expand Up @@ -182,7 +176,7 @@ jobs:
needs.changes.outputs.miscs == 'true' ||
github.ref == 'refs/heads/main')
uses: ./.github/workflows/ci_macos.yml

python:
needs: [pre_job, changes]
if: |
Expand Down
6 changes: 3 additions & 3 deletions scripts/check_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ assert_return_value() {
local command="$1"
local expected=$2
local description="$3"

# Run command and redirect output to /dev/null
eval "$command" > /dev/null 2>&1
local actual=$?

if [ $actual -ne $expected ]; then
echo "UNIT TEST FAILED: $command (expected: $expected, got: $actual) Check code logic"
return 1
Expand All @@ -99,7 +99,7 @@ assert_return_value 'check_tag_version_match "" "1.1.1" "1.1.1"' 1 || exit 1
assert_return_value 'check_tag_version_match "" "1.1.0" "1.1.1"' 1 || exit 1
assert_return_value 'check_tag_version_match "" "1.1.2" "1.1.1"' 0 || exit 1
assert_return_value 'check_changelog "1.1.9" ' 1 || exit 1
assert_return_value 'check_changelog "0.8.0" ' 0 || exit 1
assert_return_value 'check_changelog "0.7.0" ' 0 || exit 1
assert_return_value 'check_changelog "" ' 0 || exit 1
###############################################################################

Expand Down

0 comments on commit 5d19f50

Please sign in to comment.