|
@ -3,7 +3,7 @@ |
|
|
# This file provides a basic wrapper to use git directly from the tcl console in |
|
|
# This file provides a basic wrapper to use git directly from the tcl console in |
|
|
# Vivado. |
|
|
# Vivado. |
|
|
# It requires the write_project_tcl_git.tcl script to work properly. |
|
|
# It requires the write_project_tcl_git.tcl script to work properly. |
|
|
# Unversioned files will be put in the vivado_project folder |
|
|
|
|
|
|
|
|
# Unversioned files will be put in the work_dir folder |
|
|
# |
|
|
# |
|
|
# Ricardo Barbedo |
|
|
# Ricardo Barbedo |
|
|
# |
|
|
# |
|
@ -20,7 +20,7 @@ namespace eval ::git_wrapper { |
|
|
set command [lindex $args 0] |
|
|
set command [lindex $args 0] |
|
|
|
|
|
|
|
|
# Change directory project directory if not in it yet |
|
|
# Change directory project directory if not in it yet |
|
|
set proj_dir [regsub {\/vivado_project$} [get_property DIRECTORY [current_project]] {}] |
|
|
|
|
|
|
|
|
set proj_dir [regsub {\/work_dir$} [get_property DIRECTORY [current_project]] {}] |
|
|
set current_dir [pwd] |
|
|
set current_dir [pwd] |
|
|
if { |
|
|
if { |
|
|
[string compare -nocase $proj_dir $current_dir] |
|
|
[string compare -nocase $proj_dir $current_dir] |
|
@ -44,7 +44,7 @@ namespace eval ::git_wrapper { |
|
|
# Generate gitignore file |
|
|
# Generate gitignore file |
|
|
puts "Generate gitignore file" |
|
|
puts "Generate gitignore file" |
|
|
set file [open ".gitignore" "w"] |
|
|
set file [open ".gitignore" "w"] |
|
|
puts $file "vivado_project/*" |
|
|
|
|
|
|
|
|
puts $file "work_dir/*" |
|
|
puts $file ".Xil/*" |
|
|
puts $file ".Xil/*" |
|
|
puts $file "*.str" |
|
|
puts $file "*.str" |
|
|
puts $file "*.log" |
|
|
puts $file "*.log" |
|
@ -67,7 +67,7 @@ namespace eval ::git_wrapper { |
|
|
puts $file "" |
|
|
puts $file "" |
|
|
puts $file "- Place source/design files in folder created in the top directory of the repo (e.g. `REPO/src/` or `REPO/design/`)." |
|
|
puts $file "- Place source/design files in folder created in the top directory of the repo (e.g. `REPO/src/` or `REPO/design/`)." |
|
|
puts $file "" |
|
|
puts $file "" |
|
|
puts $file "- **The `vivado_project` folder will be untracked!**" |
|
|
|
|
|
|
|
|
puts $file "- **The `work_dir` folder will be untracked!**" |
|
|
puts $file "" |
|
|
puts $file "" |
|
|
puts $file "- Wenn you are done, `git add` your source/design files." |
|
|
puts $file "- Wenn you are done, `git add` your source/design files." |
|
|
puts $file "" |
|
|
puts $file "" |
|
@ -105,7 +105,7 @@ namespace eval ::git_wrapper { |
|
|
|
|
|
|
|
|
proc wproj {} { |
|
|
proc wproj {} { |
|
|
# Change directory project directory if not in it yet |
|
|
# Change directory project directory if not in it yet |
|
|
set proj_dir [regsub {\/vivado_project$} [get_property DIRECTORY [current_project]] {}] |
|
|
|
|
|
|
|
|
set proj_dir [regsub {\/work_dir$} [get_property DIRECTORY [current_project]] {}] |
|
|
set current_dir [pwd] |
|
|
set current_dir [pwd] |
|
|
if { |
|
|
if { |
|
|
[string compare -nocase $proj_dir $current_dir] |
|
|
[string compare -nocase $proj_dir $current_dir] |
|
|