Pārlūkot izejas kodu

Add script for editing version number

Ryan C. Thompson 10 gadi atpakaļ
vecāks
revīzija
39cd60f898
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9 0
      setversion.sh

+ 9 - 0
setversion.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+TARGET_VERSION="$1"
+if [ -n "$TARGET_VERSION" ]; then
+    echo "Updating version to $TARGET_VERSION";
+    perl -i'orig_*' -lape "s/Version: [0-9.]+/Version: $TARGET_VERSION/g;" \
+        -e "s/(defconst.*-version\s+)\"[0-9.]+\"/\${1}\"$TARGET_VERSION\"/g;" \
+        *.el
+fi