This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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/") | |
OlderNewer