Permalink
Browse files

Put version in a file included by all .asd files

Also change scripts/release.sh to update the new version file
  • Loading branch information...
1 parent aaeb000 commit 4258d9c92312b068a65b54b13d403dcaa067aa00 @sionescu committed May 6, 2012
Showing with 32 additions and 12 deletions.
  1. +4 −0 cffi-examples.asd
  2. +4 −0 cffi-grovel.asd
  3. +4 −0 cffi-libffi.asd
  4. +4 −0 cffi-tests.asd
  5. +4 −0 cffi-uffi-compat.asd
  6. +4 −0 cffi.asd
  7. +6 −12 scripts/release.sh
  8. +2 −0 version.lisp-expr
View
@@ -28,6 +28,10 @@
(defsystem cffi-examples
:description "CFFI Examples"
:author "James Bielman <jamesjb@jamesjb.com>"
+ :version #.(with-open-file (f (merge-pathnames "version.lisp-expr"
+ (or *compile-file-pathname*
+ *load-truename*)))
+ (read f))
:components
((:module examples
:components
View
@@ -28,6 +28,10 @@
(asdf:defsystem cffi-grovel
:description "The CFFI Groveller"
:author "Dan Knapp <dankna@accela.net>"
+ :version #.(with-open-file (f (merge-pathnames "version.lisp-expr"
+ (or *compile-file-pathname*
+ *load-truename*)))
+ (read f))
:depends-on (cffi alexandria)
:licence "MIT"
:components
View
@@ -35,6 +35,10 @@
:description "Foreign structures by value"
:author "Liam Healy <lhealy@common-lisp.net>"
:maintainer "Liam Healy <lhealy@common-lisp.net>"
+ :version #.(with-open-file (f (merge-pathnames "version.lisp-expr"
+ (or *compile-file-pathname*
+ *load-truename*)))
+ (read f))
:defsystem-depends-on (#:trivial-features #:cffi-grovel)
:components
((:module libffi
View
@@ -58,6 +58,10 @@
(defsystem cffi-tests
:description "Unit tests for CFFI."
:depends-on (cffi bordeaux-threads #-ecl rt)
+ :version #.(with-open-file (f (merge-pathnames "version.lisp-expr"
+ (or *compile-file-pathname*
+ *load-truename*)))
+ (read f))
:components
((:module "tests"
:serial t
View
@@ -32,6 +32,10 @@
(defsystem cffi-uffi-compat
:description "UFFI Compatibility Layer for CFFI"
:author "James Bielman <jamesjb@jamesjb.com>"
+ :version #.(with-open-file (f (merge-pathnames "version.lisp-expr"
+ (or *compile-file-pathname*
+ *load-truename*)))
+ (read f))
:components
((:module uffi-compat
:components
View
@@ -35,6 +35,10 @@
:description "The Common Foreign Function Interface"
:author "James Bielman <jamesjb@jamesjb.com>"
:maintainer "Luis Oliveira <loliveira@common-lisp.net>"
+ :version #.(with-open-file (f (merge-pathnames "version.lisp-expr"
+ (or *compile-file-pathname*
+ *load-truename*)))
+ (read f))
:licence "MIT"
:depends-on (:alexandria :trivial-features :babel)
:components
View
@@ -9,6 +9,7 @@ fi
PROJECT_NAME='cffi'
ASDF_FILE="$PROJECT_NAME.asd"
+VERSION_EXPR_FILE="version.lisp-expr"
HOST="common-lisp.net"
RELEASE_DIR="/project/$PROJECT_NAME/public_html/releases"
VERSION_FILE="VERSION"
@@ -58,7 +59,7 @@ fi
### Determine new version number
if [ -z "$VERSION" ]; then
- CURRENT_VERSION=$(git tag -l v\*.\*.\* | head -n1 | cut -dv -f2)
+ CURRENT_VERSION=$(awk -F '"' '/^"/ {print $2}' < ${VERSION_EXPR_FILE})
dots=$(echo "$CURRENT_VERSION" | tr -cd '.')
count=$(expr length "$dots" + 1)
@@ -95,12 +96,10 @@ DIST_NAME="${PROJECT_NAME}_${VERSION}"
TARBALL="$DIST_NAME.tar.gz"
SIGNATURE="$TARBALL.asc"
-#echo "Updating $ASDF_FILE with new version: $VERSION"
-#sed -e "s/:version \"$CURRENT_VERSION\"/:version \"$VERSION\"/" \
-# "$ASDF_FILE" > "$ASDF_FILE.tmp"
-#mv "$ASDF_FILE.tmp" "$ASDF_FILE"
-#
-#darcs record -m "update $ASDF_FILE for version $VERSION"
+echo "Updating ${VERSION_EXPR_FILE} with new version: ${VERSION}"
+echo -e ";; -*- lisp -*-\n\"${VERSION}\"" > ${VERSION_EXPR_FILE}
+
+git commit -m "Release version ${VERSION}" ${VERSION_EXPR_FILE}
echo "Tagging the tree..."
git tag "v$VERSION"
@@ -109,11 +108,6 @@ echo "Creating distribution..."
mkdir "$DIST_NAME"
git archive master | tar xC "$DIST_NAME"
-echo "Updating $ASDF_FILE with new version: $VERSION"
-sed -e "s/^(defsystem \(.*\)/(defsystem \1\n :version \"$VERSION\"/" \
- "$DIST_NAME/$ASDF_FILE" > "$DIST_NAME/$ASDF_FILE.tmp"
-mv "$DIST_NAME/$ASDF_FILE.tmp" "$DIST_NAME/$ASDF_FILE"
-
echo "Creating and signing tarball..."
tar czf "$TARBALL" "$DIST_NAME"
gpg -b -a "$TARBALL"
View
@@ -0,0 +1,2 @@
+;; -*- lisp -*-
+"0.10.7.1.99"

0 comments on commit 4258d9c

Please sign in to comment.