mason: add workaround for cygwin git issue
							parent
							
								
									11ef68180d
								
							
						
					
					
						commit
						1596d9aeae
					
				| 
						 | 
					@ -18,6 +18,6 @@ IN: mason.cleanup
 | 
				
			||||||
        build-dir [
 | 
					        build-dir [
 | 
				
			||||||
            compress-image
 | 
					            compress-image
 | 
				
			||||||
            compress-test-log
 | 
					            compress-test-log
 | 
				
			||||||
            "factor" delete-tree
 | 
					            "factor" really-delete-tree
 | 
				
			||||||
        ] with-directory
 | 
					        ] with-directory
 | 
				
			||||||
    ] unless ;
 | 
					    ] unless ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,11 +2,22 @@
 | 
				
			||||||
! See http://factorcode.org/license.txt for BSD license.
 | 
					! See http://factorcode.org/license.txt for BSD license.
 | 
				
			||||||
USING: kernel namespaces sequences splitting system accessors
 | 
					USING: kernel namespaces sequences splitting system accessors
 | 
				
			||||||
math.functions make io io.files io.pathnames io.directories
 | 
					math.functions make io io.files io.pathnames io.directories
 | 
				
			||||||
io.launcher io.encodings.utf8 prettyprint
 | 
					io.directories.hierarchy io.launcher io.encodings.utf8 prettyprint
 | 
				
			||||||
combinators.short-circuit parser combinators calendar
 | 
					combinators.short-circuit parser combinators calendar
 | 
				
			||||||
calendar.format arrays mason.config locals ;
 | 
					calendar.format arrays mason.config locals system ;
 | 
				
			||||||
IN: mason.common
 | 
					IN: mason.common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HOOK: really-delete-tree os ( path -- )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					M: windows really-delete-tree
 | 
				
			||||||
 | 
					    #! Workaround: Cygwin GIT creates read-only files for
 | 
				
			||||||
 | 
					    #! some reason.
 | 
				
			||||||
 | 
					    [ { "chmod" "ug+rw" "-R" } swap (normalize-path) suffix try-process ]
 | 
				
			||||||
 | 
					    [ delete-tree ]
 | 
				
			||||||
 | 
					    bi ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					M: unix really-delete-tree delete-tree ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: short-running-process ( command -- )
 | 
					: short-running-process ( command -- )
 | 
				
			||||||
    #! Give network operations at most 15 minutes to complete.
 | 
					    #! Give network operations at most 15 minutes to complete.
 | 
				
			||||||
    <process>
 | 
					    <process>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,7 +29,7 @@ IN: mason.release.archive
 | 
				
			||||||
        "-fs" "HFS+"
 | 
					        "-fs" "HFS+"
 | 
				
			||||||
    "-volname" "factor" }
 | 
					    "-volname" "factor" }
 | 
				
			||||||
    archive-name suffix try-process
 | 
					    archive-name suffix try-process
 | 
				
			||||||
    "dmg-root" delete-tree ;
 | 
					    "dmg-root" really-delete-tree ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: make-unix-archive ( -- )
 | 
					: make-unix-archive ( -- )
 | 
				
			||||||
    [ "tar" , "-cvzf" , archive-name , "factor" , ] { } make try-process ;
 | 
					    [ "tar" , "-cvzf" , archive-name , "factor" , ] { } make try-process ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,11 +12,11 @@ IN: mason.release.tidy
 | 
				
			||||||
    append ;
 | 
					    append ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: remove-common-files ( -- )
 | 
					: remove-common-files ( -- )
 | 
				
			||||||
    common-files [ delete-tree ] each ;
 | 
					    common-files [ really-delete-tree ] each ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: remove-factor-app ( -- )
 | 
					: remove-factor-app ( -- )
 | 
				
			||||||
    target-os get "macosx" =
 | 
					    target-os get "macosx" =
 | 
				
			||||||
    [ "Factor.app" delete-tree ] unless ;
 | 
					    [ "Factor.app" really-delete-tree ] unless ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: tidy ( -- )
 | 
					: tidy ( -- )
 | 
				
			||||||
    "factor" [ remove-factor-app remove-common-files ] with-directory ;
 | 
					    "factor" [ remove-factor-app remove-common-files ] with-directory ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue