Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch upstream #646

Merged
merged 1 commit into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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