Skip to content

Commit

Permalink
$mol_build: auto pull
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Jan 14, 2024
1 parent dd23f6d commit 8983bad
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build/build.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,15 @@ namespace $ {
if( mod.type() !== 'dir' ) return false

const git_dir = mod.resolve( '.git' )
if( git_dir.exists() ) return false

if( git_dir.exists() ) {

this.$.$mol_exec( mod.path() , 'git' , 'pull', '--deepen=1' )
// mod.reset()
// for ( const sub of mod.sub() ) sub.reset()

return false
}

for( let repo of mapping.select( 'pack' , mod.name() , 'git' ).sub ) {

this.$.$mol_exec( mod.path() , 'git' , 'init' )
Expand Down

0 comments on commit 8983bad

Please sign in to comment.