Permalink
Browse files

Added automatic version update script that generates version.sml and …

…smackage.smackspec for a given version.
  • Loading branch information...
1 parent 1aaa04b commit d9b89a5b61449c5b4550377dc55369bed03a2f6c @gian gian committed Nov 2, 2011
Showing with 61 additions and 4 deletions.
  1. +1 −0 smack-nonposix.cm
  2. +1 −0 smack-nonposix.mlb
  3. +1 −0 smack.cm
  4. +1 −0 smack.mlb
  5. +1 −1 smackage.smackspec
  6. +21 −0 smackage.smackspec.in
  7. +2 −2 src/configure.sml
  8. +2 −1 src/main.sml
  9. +6 −0 src/version.sml
  10. +25 −0 version.sh
View
@@ -6,4 +6,5 @@ Group is
src/bullshit-symlink.sml
src/smackage-path.sml
src/smacklib.sml
+ src/version.sml
src/main.sml
View
@@ -6,5 +6,6 @@
src/bullshit-symlink.sml
src/smackage-path.sml
src/smacklib.sml
+ src/version.sml
src/main.sml
src/go.sml
View
@@ -6,4 +6,5 @@ Group is
src/posix-symlink.sml
src/smackage-path.sml
src/smacklib.sml
+ src/version.sml
src/main.sml
View
@@ -6,5 +6,6 @@
src/posix-symlink.sml
src/smackage-path.sml
src/smacklib.sml
+ src/version.sml
src/main.sml
src/go.sml
View
@@ -1,4 +1,4 @@
-provides: smackage 0.5.4
+provides: smackage v1.0.0alpha0
description: Smackage, a simple Standard ML package manager
maintainer: Gian Perrone <gdpe at itu dot dk>
maintainer: Robert J. Simmons <robsimmons at gmail dot com>
View
@@ -0,0 +1,21 @@
+provides: smackage ###VERSION###
+description: Smackage, a simple Standard ML package manager
+maintainer: Gian Perrone <gdpe at itu dot dk>
+maintainer: Robert J. Simmons <robsimmons at gmail dot com>
+maintainer: Michael Sullivan
+maintainer: Joakim Ahnfelt-R�nne
+keywords: package manager
+bug-url: https://github.com/standardml/smackage/issues
+platform: mlton
+ build: make mlton
+ install: mv bin/smackage ../../../bin/smackage
+platform: win+smlnj
+ build: make win+smlnj
+ install: mv bin/smackage ../../../bin/smackage
+platform: smlnj
+ build: make smlnj
+ install: mv bin/smackage ../../../bin/smackage
+platform: polyml
+ build: make polyml
+ install: mv bin/smackage ../../../bin/smackage
+
View
@@ -138,11 +138,11 @@ struct
; initFile "sources.local"
"smackage git git://github.com/standardml/smackage.git\n"
; initFile "config"
- ("source " ^ ("lib" // "smackage" // "v0" // "sources") ^ "\n\
+ ("source " ^ ("lib" // "smackage" // "v1" // "sources") ^ "\n\
\compiler mlton\n\
\compiler smlnj\n\
\platform " ^ guessPlatform () ^ "\n")
- ; initFile "packages.installed" "smackage v0\n"
+ ; initFile "packages.installed" "smackage v1\n"
; initFile "versions.smackspec" "\n"
; initDir "lib"
; initDir "bin"
View
@@ -334,7 +334,7 @@ struct
to do a "total" refresh than to re-download smackage's sources. *)
fun selfupdate () =
( refresh false
- ; ignore (get true false "smackage" (SOME (SemVer.constrFromString "v0")))
+ ; ignore (get true false "smackage" (SOME (SemVer.constrFromString "v1")))
; refresh true
; OS.Process.success)
@@ -370,6 +370,7 @@ struct
end
val usage =
+ "Smackage " ^ Version.version ^ "\n" ^
"Usage: smackage <command> [args]\n\
\Commands, with <required> and [optional] arguments:\n\
\\texec <name> [version] <cmd ...>\tRuns `cmd ...' in the specified\n\
View
@@ -0,0 +1,6 @@
+(* Generated by version.sml *)
+structure Version =
+struct
+ val version = "v1.0.0alpha0"
+end
+
View
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# version.sh
+#
+# Generates src/version.sml and smackage.smackspec based on the current version
+# Usage: version.sh vX.Y.Z
+# gdpe, Nov 2 2011
+
+if [ $# -ne 1 ]
+then
+ echo "Usage: version.sh vX.Y.Z"
+ exit 1
+fi
+
+
+cat smackage.smackspec.in | sed "s/###VERSION###/$1/" > smackage.smackspec
+echo "(* Generated by version.sml *)\n\
+structure Version = \n\
+struct\n\
+ val version = \"$1\"\n\
+end\n" > src/version.sml
+
+echo "Generated files."
+echo "Now run 'git tag $1'"
+

0 comments on commit d9b89a5

Please sign in to comment.