diff --git a/contrib/msi/msversion.sh b/contrib/msi/msversion.sh index 61f221d9..286af327 100644 --- a/contrib/msi/msversion.sh +++ b/contrib/msi/msversion.sh @@ -17,30 +17,6 @@ if [ $? != 0 ] || [ -z "$BRANCH" ]; then BRANCH="master" fi -# Split out into major, minor and patch numbers -MAJOR=$(echo $TAG | cut -c 2- | cut -d "." -f 1) -MINOR=$(echo $TAG | cut -c 2- | cut -d "." -f 2) -PATCH=$(echo $TAG | cut -c 2- | cut -d "." -f 3 | awk -F"rc" '{print $1}') +STAG=$(echo $TAG | sed 's/v//' | sed 's/[^0123456789.].//') -# Output in the desired format -if [ $((PATCH)) -eq 0 ]; then - printf '%s%d.%d' "$PREPEND" "$((MAJOR))" "$((MINOR))" -else - printf '%s%d.%d.%d' "$PREPEND" "$((MAJOR))" "$((MINOR))" "$((PATCH))" -fi - -# Add the build tag on non-master branches -if [ "$BRANCH" != "master" ]; then - BUILD=$(git rev-list --count $TAG..HEAD 2>/dev/null) - - # Did getting the count of commits since the tag succeed? - if [ $? != 0 ] || [ -z "$BUILD" ]; then - printf -- "-unknown" - exit 0 - fi - - # Is the build greater than zero? - if [ $((BUILD)) -gt 0 ]; then - printf -- "-%04d" "$((BUILD))" - fi -fi \ No newline at end of file +printf '%s' "$STAG" diff --git a/src/defaults/defaults_windows.go b/src/defaults/defaults_windows.go index fabb7828..f6d686ca 100644 --- a/src/defaults/defaults_windows.go +++ b/src/defaults/defaults_windows.go @@ -5,21 +5,21 @@ package defaults // Sane defaults for the Windows platform. The "default" options may be // may be replaced by the running configuration. func GetDefaults() platformDefaultParameters { - return platformDefaultParameters{ - // Admin - DefaultAdminListen: "tcp://localhost:9001", + return platformDefaultParameters{ + // Admin + DefaultAdminListen: "tcp://localhost:9001", - // Configuration (used for meshctl) - DefaultConfigFile: "C:\\Program Files\\RiV-mesh\\mesh.conf", + // Configuration (used for meshctl) + DefaultConfigFile: "C:\\Program Files\\RiV-mesh\\mesh.conf", - // Multicast interfaces - DefaultMulticastInterfaces: []MulticastInterfaceConfig{ - {Regex: ".*", Beacon: true, Listen: true}, - }, + // Multicast interfaces + DefaultMulticastInterfaces: []MulticastInterfaceConfig{ + {Regex: ".*", Beacon: true, Listen: true}, + }, - // TUN/TAP - MaximumIfMTU: 65535, - DefaultIfMTU: 65535, - DefaultIfName: "RiV-mesh", - } + // TUN/TAP + MaximumIfMTU: 65535, + DefaultIfMTU: 65535, + DefaultIfName: "RiV-mesh", + } }