File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,17 @@ DOTNET_VERSION="${1:-}"
99
1010GLOBAL_JSON_BACKUPS=()
1111
12+ expected_global_json_symlink_target () {
13+ local path=" $1 "
14+
15+ case " $path " in
16+ " $SDK_PATH /examples~/regression-tests/server/global.json" ) echo " ../../../../../global.json" ;;
17+ " $SDK_PATH /examples~/regression-tests/republishing/server-initial/global.json" ) echo " ../../../../../../global.json" ;;
18+ " $SDK_PATH /examples~/regression-tests/republishing/server-republish/global.json" ) echo " ../../../../../../global.json" ;;
19+ * ) return 1 ;;
20+ esac
21+ }
22+
1223backup_global_json_once () {
1324 local path=" $1 "
1425 local entry
@@ -25,6 +36,8 @@ backup_global_json_once() {
2536 backup=" $( mktemp) "
2637 cp " $path " " $backup "
2738 GLOBAL_JSON_BACKUPS+=(" $path |file:$backup " )
39+ elif target=" $( expected_global_json_symlink_target " $path " ) " ; then
40+ GLOBAL_JSON_BACKUPS+=(" $path |symlink:$target " )
2841 else
2942 GLOBAL_JSON_BACKUPS+=(" $path |missing:" )
3043 fi
Original file line number Diff line number Diff line change 1616
1717GLOBAL_JSON_BACKUPS=()
1818
19+ expected_global_json_symlink_target () {
20+ local path=" $1 "
21+
22+ case " $path " in
23+ " $SDK_PATH /examples~/regression-tests/server/global.json" ) echo " ../../../../../global.json" ;;
24+ " $SDK_PATH /examples~/regression-tests/republishing/server-initial/global.json" ) echo " ../../../../../../global.json" ;;
25+ " $SDK_PATH /examples~/regression-tests/republishing/server-republish/global.json" ) echo " ../../../../../../global.json" ;;
26+ * ) return 1 ;;
27+ esac
28+ }
29+
1930backup_global_json_once () {
2031 local path=" $1 "
2132 local entry
@@ -32,6 +43,8 @@ backup_global_json_once() {
3243 backup=" $( mktemp) "
3344 cp " $path " " $backup "
3445 GLOBAL_JSON_BACKUPS+=(" $path |file:$backup " )
46+ elif target=" $( expected_global_json_symlink_target " $path " ) " ; then
47+ GLOBAL_JSON_BACKUPS+=(" $path |symlink:$target " )
3548 else
3649 GLOBAL_JSON_BACKUPS+=(" $path |missing:" )
3750 fi
You can’t perform that action at this time.
0 commit comments