Skip to content

Instantly share code, notes, and snippets.

View ebwood's full-sized avatar
🎯
keep running, keep coding

ebwood ebwood

🎯
keep running, keep coding
View GitHub Profile
@ebwood
ebwood / increment_build_number.sh
Created March 16, 2025 17:09
Flutter increment build number script
#!/bin/bash
# Read pubspec.yaml
file="pubspec.yaml"
# Use grep and sed to find and increment the build number
if grep -qE "version: [0-9]+\.[0-9]+\.[0-9]+\+[0-9]+" "$file"; then
# Get the current build number
current_build=$(grep -E "version: [0-9]+\.[0-9]+\.[0-9]+\+[0-9]+" "$file" | sed -E "s/version: [0-9]+\.[0-9]+\.[0-9]+\+([0-9]+)/\1/")