Browse Source

Add utility

 - This script write the new version number where it is necessary
Leo 10 years ago
parent
commit
588519e139
2 changed files with 24 additions and 0 deletions
  1. 1 0
      CHANGELOG.md
  2. 23 0
      version_set.sh

+ 1 - 0
CHANGELOG.md

@@ -15,6 +15,7 @@
    + New default name : `/tmp/.oclaunch_trace.dat`
  + Add logo.
  + Clean up some code.
+ + improve utility set given with the repository (developer)
 
 ## v0.1.x
 

+ 23 - 0
version_set.sh

@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# A script to set version number to $1
+# Example: ./version_set.sh 0.1
+
+# Current version number
+current_version=$(cat ./VERSION)
+
+# New, wanted one
+new_version=$1
+
+
+# Print what will be done
+echo "Put" $new_version "instead of" $new_version
+
+# Replace in the three files : VERSION, _oasis, src/oclaunch.ml
+echo $new_version > VERSION
+sed -i -e "s/Version:     .*/Version:     $new_version/" _oasis
+sed -i -e "s/\\(let version_number = \"\\).*\\(\";;\\)/\\1$new_version\\2/" src/oclaunch.ml
+
+# Display the result
+echo "Result"
+git diff