Skip to content

Commit

Permalink
Add release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
spuder committed Nov 5, 2024
1 parent 4d7a36e commit 0945219
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
Empty file added CHANGELOG.md
Empty file.
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ layout: home

# 📟 OpenSpool Firmware Installation

Latest Versions:
![](https://img.shields.io/badge/openspool-0.1.24-magenta)

<div class="install-container">
Expand Down
6 changes: 2 additions & 4 deletions firmware/common.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
substitutions:
name: openspool
version: "0.1.1"

esphome:
name: ${name}
Expand All @@ -14,7 +13,6 @@ esphome:
# upload_speed: 115200 #TODO: This fails the first time no matter what
build_unflags: -std=gnu++11
build_flags: -std=gnu++14
# upload_speed: 115200 # Wemos D1 Mini from Aliexpress struggle at 460800 baud rate
on_boot:
then:
- script.execute: set_led_rainbow
Expand Down Expand Up @@ -65,7 +63,7 @@ packages:
# uptime: !include conf.d/uptime.yaml
wifi: !include conf.d/wifi.yaml
web_server: !include conf.d/web_server.yaml
#debug: !include conf.d/debug.yaml
debug: !include conf.d/debug.yaml
# time: !include conf.d/time.yaml
status_led: !include conf.d/status_led.yaml
mqtt_bambu_lan: !include conf.d/mqtt_bambu_lan.yaml
Expand All @@ -77,4 +75,4 @@ packages:
leds: !include conf.d/leds.yaml
improv: !include conf.d/improv.yaml
# bambu_ams: !include conf.d/bambu_ams.yaml
# update: !include conf.d/update.yaml
update: !include conf.d/update.yaml
36 changes: 36 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Be sure to install git-semver
# (git clone https://github.com/markchalloner/git-semver.git && sudo git-semver/install.sh)

# Check if git-semver is installed
if ! command -v git-semver &> /dev/null
then
echo "git-semver is not installed. Please install it first."
exit 1
fi

echo "Select release type:"
echo "1) Patch"
echo "2) Minor"
echo "3) Major"
read -p "Enter your choice (1-3): " choice

case $choice in
1) target="patch" ;;
2) target="minor" ;;
3) target="major" ;;
*) echo "Invalid choice"; exit 1 ;;
esac

new_version=$(git-semver -target $target)
echo "New version will be: $new_version"

read -p "Proceed with tagging? (y/n): " confirm
if [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]]; then
git tag -a "v$new_version" -m "Release $new_version"
git push origin "v$new_version"
echo "Tagged and pushed v$new_version"
else
echo "Aborted"
fi

0 comments on commit 0945219

Please sign in to comment.