Skip to content

Commit

Permalink
Test refactoring common scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
isboston committed Jan 23, 2025
1 parent 7224292 commit 7c5acf1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ on:
deb_build:
description: 'Trigger DEB build'
required: false
default: 'false'
default: 'true'
rpm_build:
description: 'Trigger RPM build'
required: false
default: 'true'
default: 'false'

concurrency:
group: ${{ github.ref }}
Expand All @@ -57,6 +57,13 @@ jobs:
with:
fetch-depth: 0

- name: "Checking common scripts for errors"
run: |
set -eux
sudo apt-get install -y shellcheck
find install/common -type f -name "*.sh" | xargs shellcheck --exclude="$(awk '!/^#|^$/ {print $1}' tests/lint/sc_ignore | paste -sd ",")" --severity=warning | tee sc_output
awk '/\(warning\):/ {w++} /\(error\):/ {e++} END {if (w+e) printf "::warning ::ShellCheck detected %d warnings and %d errors\n", w+0, e+0}' sc_output
- name: Determine changed
id: changes
run: |
Expand All @@ -69,8 +76,8 @@ jobs:
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
[[ "${{ github.event.inputs.deb_build }}" == "true" ]] && package_types+=("deb")
[[ "${{ github.event.inputs.rpm_build }}" == "true" ]] && package_types+=("rpm")
elif [[ "${{ steps.changes.outputs.build_all }}" == "true" ]]; then
package_types+=("deb" "rpm")
# elif [[ "${{ steps.changes.outputs.build_all }}" == "true" ]]; then
# package_types+=("deb" "rpm")
else
[[ "${{ github.event.inputs.deb_build }}" == "true" ]] && package_types+=("deb")
[[ "${{ github.event.inputs.rpm_build }}" == "true" ]] && package_types+=("rpm")
Expand All @@ -89,13 +96,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Checking common scripts for errors"
run: |
set -eux
sudo apt-get install -y shellcheck
find install/common -type f -name "*.sh" | xargs shellcheck --exclude="$(awk '!/^#|^$/ {print $1}' tests/lint/sc_ignore | paste -sd ",")" --severity=warning | tee sc_output
awk '/\(warning\):/ {w++} /\(error\):/ {e++} END {if (w+e) printf "::warning ::ShellCheck detected %d warnings and %d errors\n", w+0, e+0}' sc_output

- name: Set product version
run: |
Expand Down

0 comments on commit 7c5acf1

Please sign in to comment.