Skip to content

Commit

Permalink
Merge pull request #132 from christian1980nrw/dev
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
christian1980nrw authored Oct 24, 2023
2 parents d438b92 + da2cd07 commit 7bb56a9
Show file tree
Hide file tree
Showing 6 changed files with 461 additions and 383 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ jobs:
fi
execute:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -76,18 +74,21 @@ jobs:
else
echo "I: Nothing to install for ${{ matrix.os }}"
fi
- name: Set script permissions
run: chmod +x ./victron-venus-os-install.sh
- name: Install
run: ./victron-venus-os-install.sh
env:
DEBUG: 1
DESTDIR: /tmp/testing
- name: Control
run: scripts/controller.sh
BRANCH: ${{ steps.set-branch-name.outputs.branch_name }}
- name: Execute Run-Script
run: /tmp/testing//data/etc/Spotmarket-Switcher/service/run
env:
DEBUG: 1
LOG_FILE: /tmp/testing_controller.log
- name: Run
run: scripts/run
rc_local_file: /tmp/testing_rc.local
- name: Execute Control-Script
run: /tmp/testing//data/etc/Spotmarket-Switcher/controller.sh
env:
DEBUG: 1
rc_local_file: /tmp/testing_rc.local
LOG_FILE: /tmp/testing_controller.log
36 changes: 36 additions & 0 deletions .github/workflows/main_versioning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Main Versioning

# This workflow triggers when a pull request to the 'main' branch is closed
on:
pull_request:
types: [closed]
branches:
- main

jobs:
update_version:
# Ensure this job only runs if the PR was merged, not just closed without merging
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Update VERSION in main
run: |
# Attempt to remove the -DEV suffix from the version number
NEW_VERSION=$(sed -n 's/^VERSION=\"\(.*\)-DEV\"$/\1/p' scripts/controller.sh)
# If NEW_VERSION is empty (meaning there was no -DEV), take the current value of VERSION
if [[ -z $NEW_VERSION ]]; then
NEW_VERSION=$(sed -n 's/^VERSION=\"\(.*\)\"$/\1/p' scripts/controller.sh)
fi
# Replace VERSION in the file with the NEW_VERSION value
sed -i "s/^VERSION=\".*\"$/VERSION=\"${NEW_VERSION}\"/" scripts/controller.sh
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "Update version to ${NEW_VERSION}"
git push origin main
11 changes: 8 additions & 3 deletions .github/workflows/venus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,32 @@ jobs:
if which apt > /dev/null
then
apt update
apt -y install wget curl
apt -y install wget curl cron
elif which opkg > /dev/null
then
opkg install wget
opkg install curl
else
echo "W: Tests limited because of non-avail of wget and curl"
fi
- name: Set script permissions
run: chmod +x ./victron-venus-os-install.sh
env:
DEBUG: 1
- name: Execute Installation under Venus OS
run: |
echo pwd
pwd
echo ls
ls
echo victron-venus-install.sh
echo victron-venus-os-install.sh
if ./victron-venus-os-install.sh ; then
echo "[OK]"
else
echo "[FAIL]"
pwd
find . | head -n 30
HEAD_PATH=$(which head)
find . | $HEAD_PATH -n 30
exit 1
fi
env:
Expand Down
Loading

0 comments on commit 7bb56a9

Please sign in to comment.