]> gitweb.factorcode.org Git - factor.git/commitdiff
mason.source: save git-id in source packages, just like binary packages
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 15 Feb 2010 06:01:19 +0000 (19:01 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 15 Feb 2010 06:01:19 +0000 (19:01 +1300)
extra/mason/source/source.factor

index 3a3d6a66b77c3384f6dad73c500d73d702e67f41..72c63660e310af3df1baa847eb29c35703fa3bb1 100644 (file)
@@ -8,11 +8,17 @@ IN: mason.source
 : clone-factor ( -- )
     { "git" "clone" } home "factor" append-path suffix try-process ;
 
+: save-git-id ( -- )
+    git-id "git-id" to-file ;
+
+: delete-git-tree ( -- )
+    ".git" delete-tree ;
+
+: download-images ( -- )
+    images [ download-image ] each ;
+
 : prepare-source ( -- )
-    "factor" [
-        ".git" delete-tree
-        images [ download-image ] each
-    ] with-directory ;
+    "factor" [ save-git-id delete-git-tree download-images ] with-directory ;
 
 : package-name ( version -- string )
     "factor-src-" ".zip" surround ;