Sha256: 8da9b22a508a1d6adf02ad41144978df7a73d5d8ee07aef2cab91206cf469dc5
Contents?: true
Size: 923 Bytes
Versions: 19
Compression:
Stored size: 923 Bytes
Contents
#!/bin/bash major=$(awk '/MAJOR =/ {print $3}' lib/platform_sdk/version.rb) minor=$(awk '/MINOR =/ {print $3}' lib/platform_sdk/version.rb) regex="\(([0-9]+)\.([0-9]+)\.([0-9]+)\)" output=$(gem info strongmind-platform-sdk --remote) if [[ $output =~ $regex ]] then current_major="${BASH_REMATCH[1]}" current_minor="${BASH_REMATCH[2]}" if [[ $current_major != $major || $current_minor != $minor ]] then # New major or minor version, so reset patch to 0 new_version="0" else new_version="$((BASH_REMATCH[3] + 1))" fi new_line=" PATCH = $new_version" if [[ "$OSTYPE" == "darwin"* ]]; then # macOS # Replace line 6 with new patch version sed -i "" "6s/.*/$new_line/" "lib/platform_sdk/version.rb" else # Linux # Replace line 6 with new patch version sed -i "6s/.*/$new_line/" "lib/platform_sdk/version.rb" fi else echo "No match" fi
Version data entries
19 entries across 19 versions & 1 rubygems