2008-04-11 14:38:47 -04:00
|
|
|
! Copyright (C) 2008 James Cash
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2016-08-20 23:29:24 -04:00
|
|
|
USING: combinators io.backend io.directories io.files.info.unix
|
|
|
|
io.pathnames kernel namespaces system tools.deploy.backend
|
|
|
|
tools.deploy.config tools.deploy.config.editor webbrowser ;
|
2008-04-20 01:49:42 -04:00
|
|
|
IN: tools.deploy.unix
|
2008-04-11 14:28:28 -04:00
|
|
|
|
2016-08-20 23:29:24 -04:00
|
|
|
: create-app-dir ( vocab bundle-name -- vm-path )
|
|
|
|
copy-vm dup 0o755 set-file-permissions ;
|
2015-08-05 14:01:56 -04:00
|
|
|
|
2015-08-04 22:06:19 -04:00
|
|
|
M: unix deploy*
|
2016-08-20 23:29:24 -04:00
|
|
|
deploy-name get
|
|
|
|
{
|
|
|
|
[ create-app-dir ]
|
|
|
|
[ drop deployed-image-name ]
|
|
|
|
[ drop namespace make-deploy-image-executable ]
|
|
|
|
[ nip "" [ copy-resources ] [ copy-libraries ] 3bi ]
|
2016-12-17 22:12:56 -05:00
|
|
|
[ nip maybe-open-deploy-directory ]
|
2016-08-20 23:29:24 -04:00
|
|
|
} 2cleave ;
|
2015-08-04 22:06:19 -04:00
|
|
|
|
|
|
|
M: unix deploy-path
|
|
|
|
deploy-directory get [
|
|
|
|
dup deploy-config [
|
2016-08-20 23:29:24 -04:00
|
|
|
deploy-name get swap append-path normalize-path
|
2015-08-04 22:06:19 -04:00
|
|
|
] with-variables
|
|
|
|
] with-directory ;
|