Do a 'git reset; git clean' to revert the tree to a pristine state
parent
db3c4fe43c
commit
6b0b4bbd70
|
@ -5,12 +5,10 @@ io.directories io.launcher kernel mason.common mason.platform ;
|
||||||
IN: mason.updates
|
IN: mason.updates
|
||||||
|
|
||||||
: git-reset-cmd ( -- cmd )
|
: git-reset-cmd ( -- cmd )
|
||||||
{
|
{ "git" "reset" "--hard" "HEAD" } ;
|
||||||
"git"
|
|
||||||
"reset"
|
: git-clean-cmd ( -- cmd )
|
||||||
"--hard"
|
{ "git" "clean" "-f" "-d" "-x" } ;
|
||||||
"HEAD"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
: git-pull-cmd ( -- cmd )
|
: git-pull-cmd ( -- cmd )
|
||||||
{
|
{
|
||||||
|
@ -21,9 +19,13 @@ IN: mason.updates
|
||||||
"master"
|
"master"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
: updates-available? ( -- ? )
|
: pristine-git ( -- )
|
||||||
".git/index" delete-file
|
".git/index" delete-file
|
||||||
git-reset-cmd short-running-process
|
git-reset-cmd short-running-process
|
||||||
|
git-clean-cmd short-running-process ;
|
||||||
|
|
||||||
|
: updates-available? ( -- ? )
|
||||||
|
pristine-git
|
||||||
git-id
|
git-id
|
||||||
git-pull-cmd short-running-process
|
git-pull-cmd short-running-process
|
||||||
git-id
|
git-id
|
||||||
|
|
|
@ -35,11 +35,10 @@ IN: mason.version.source
|
||||||
|
|
||||||
: make-source-release ( version git-id -- path )
|
: make-source-release ( version git-id -- path )
|
||||||
"Creating source release..." print flush
|
"Creating source release..." print flush
|
||||||
unique-directory
|
|
||||||
[
|
[
|
||||||
clone-factor prepare-source (make-source-release)
|
clone-factor prepare-source (make-source-release)
|
||||||
"Package created: " write absolute-path dup print
|
"Package created: " write absolute-path dup print
|
||||||
] with-directory ;
|
] with-unique-directory ;
|
||||||
|
|
||||||
: upload-source-release ( package version -- )
|
: upload-source-release ( package version -- )
|
||||||
"Uploading source release..." print flush
|
"Uploading source release..." print flush
|
||||||
|
|
Loading…
Reference in New Issue