mirror of
https://github.com/vlang/v.git
synced 2025-09-18 11:56:57 -04:00
tools: protect from cleaning during v up
, only ./v , not any matching folder
This commit is contained in:
parent
671f59c570
commit
1e8873fbb6
@ -69,12 +69,12 @@ fn (app App) update_from_master() {
|
|||||||
// initialize the folder, as if it had been cloned:
|
// initialize the folder, as if it had been cloned:
|
||||||
app.git_command('git init')
|
app.git_command('git init')
|
||||||
app.git_command('git remote add origin https://github.com/vlang/v')
|
app.git_command('git remote add origin https://github.com/vlang/v')
|
||||||
app.git_command('git remote set-head origin master')
|
|
||||||
app.git_command('git fetch')
|
app.git_command('git fetch')
|
||||||
|
app.git_command('git remote set-head origin master')
|
||||||
app.git_command('git reset --hard origin/master')
|
app.git_command('git reset --hard origin/master')
|
||||||
// Note: in the .zip files, thirdparty/tcc/.git is missing to save space.
|
// Note: in the .zip files, thirdparty/tcc/.git is missing to save space.
|
||||||
// -> Git clean below will try to remove thirdparty/tcc/ too, if it is not excluded specifically:
|
// -> Git clean below will try to remove thirdparty/tcc/ too, if it is not excluded specifically:
|
||||||
app.git_command('git clean -xfd --exclude thirdparty/tcc --exclude v --exclude v.exe --exclude cmd/tools/vup --exclude cmd/tools/vup.exe .')
|
app.git_command('git clean -xfd --exclude ./thirdparty/tcc --exclude ./v --exclude ./v.exe --exclude ./cmd/tools/vup --exclude ./cmd/tools/vup.exe .')
|
||||||
} else {
|
} else {
|
||||||
// pull latest
|
// pull latest
|
||||||
app.git_command('git pull https://github.com/vlang/v master')
|
app.git_command('git pull https://github.com/vlang/v master')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user