Skip to content

Commit

Permalink
changed jkbms_ble to dev (#631)
Browse files Browse the repository at this point in the history
* changed jkbms_ble to dev

* changed order

* test automatic release version change

* test automatic release version change

* test automatic release version change

* added option in bug issue template
  • Loading branch information
mr-manuel authored May 13, 2023
1 parent 88e5eea commit 9eb4647
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ body:
- Please select
- Serial USB adapter to TTL
- Serial USB adapter to RS485
- Raspberry Pi RS485 HAT
- Bluetooth
validations:
required: true
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Replace version string
run: |
echo $GITHUB_REF_NAME
VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//')
echo $VERSION
echo
head -n 39 etc/dbus-serialbattery/utils.py | tail -n 3
sed -i --regexp-extended --expression="s/[0-9]+\.[0-9]+\.[0-9a-z\_\-]+/$VERSION/" "etc/dbus-serialbattery/utils.py"
head -n 39 etc/dbus-serialbattery/utils.py | tail -n 3
- name: build release archive
run: |
find . -type f -name "*.py" -exec chmod +x {} \;
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Replace version string
run: |
echo $GITHUB_REF_NAME
VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//')
echo $VERSION
echo
head -n 39 etc/dbus-serialbattery/utils.py | tail -n 3
sed -i --regexp-extended --expression="s/[0-9]+\.[0-9]+\.[0-9a-z\_\-]+/$VERSION/" "etc/dbus-serialbattery/utils.py"
head -n 39 etc/dbus-serialbattery/utils.py | tail -n 3
- name: build release archive
run: |
find . -type f -name "*.py" -exec chmod +x {} \;
Expand Down
24 changes: 11 additions & 13 deletions etc/dbus-serialbattery/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
echo ""
PS3="Select which version you want to install and enter the corresponding number [1]: "

select version in "latest release (recommended)" "nightly build" "local tar file" "specific version" "quit"
select version in "latest release (recommended)" "specific version" "nightly build" "local tar file" "quit"
do
case $version in
"latest release (recommended)")
echo "Selected: $version"
#echo "Selected number: $REPLY"
break
;;
"nightly build")
"specific version")
echo "Selected: $version"
#echo "Selected number: $REPLY"
break
;;
"local tar file")
"nightly build")
echo "Selected: $version"
#echo "Selected number: $REPLY"
break
;;
"specific version")
"local tar file")
echo "Selected: $version"
#echo "Selected number: $REPLY"
break
Expand All @@ -46,11 +46,6 @@ if [ "$version" = "latest release (recommended)" ]; then
curl -s https://api.github.com/repos/Louisvdw/dbus-serialbattery/releases/latest | grep "browser_download_url.*gz" | cut -d : -f 2,3 | tr -d \" | wget -O /tmp/venus-data.tar.gz -qi -
fi

## local tar file
if [ "$version" = "local tar file" ]; then
echo "Make sure the file is available at \"/var/volatile/tmp/venus-data.tar.gz\""
fi

## specific version
if [ "$version" = "specific version" ]; then
# read the url
Expand All @@ -62,7 +57,10 @@ if [ "$version" = "specific version" ]; then
fi
fi


## local tar file
if [ "$version" = "local tar file" ]; then
echo "Make sure the file is available at \"/var/volatile/tmp/venus-data.tar.gz\""
fi

# backup config.ini
if [ -f "/data/etc/dbus-serialbattery/config.ini" ]; then
Expand All @@ -72,7 +70,7 @@ fi


## extract the tar file
if [ "$version" = "latest release (recommended)" ] || [ "$version" = "local tar file" ] || [ "$version" = "specific version" ]; then
if [ "$version" = "latest release (recommended)" ] || [ "$version" = "specific version" ] || [ "$version" = "local tar file" ]; then

# extract driver
if [ -f "/tmp/venus-data.tar.gz" ]; then
Expand All @@ -96,15 +94,15 @@ if [ "$version" = "nightly build" ]; then

PS3="Select the branch from wich you want to install the current code (possible bugs included): "

select branch in master jkbms_ble quit
select branch in master dev quit
do
case $branch in
master)
echo "Selected branch: $branch"
#echo "Selected number: $REPLY"
break
;;
jkbms_ble)
dev)
echo "Selected branch: $branch"
#echo "Selected number: $REPLY"
break
Expand Down

0 comments on commit 9eb4647

Please sign in to comment.