Fix v1 manifest format for git and local path (#1821)

* Bump simple-git to v0.2.10

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix v1 manifest format for git and local path

Fixed #1815

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix v1 format for custom registry

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Remove unused functions

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix compilation

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update git.sh

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fixed git.sh for windows

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* fixx git.sh for win

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Update git.sh

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* fix git.sh

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2024-07-17 15:34:12 +10:00 committed by GitHub
parent 5a316b765f
commit eba07fb147
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 112 additions and 38 deletions

View file

@ -46,16 +46,29 @@ cp -r manifests/workspace/* "$GIT"
git add .
git commit -m 'Update to workspace'
)
COMMIT_HASH="$(cd "$GIT" && git rev-parse HEAD)"
# Install binaries using `--git`
if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]; then
source="(git+file:///$(cygpath -m "$GIT")#$COMMIT_HASH)"
else
source="(git+file://$GIT#$COMMIT_HASH)"
fi
# Install cargo-binstall using `--git`
"./$1" binstall --force --git "file://$GIT" --no-confirm cargo-binstall
test_cargo_binstall_install
# Install binaries using `--git`
cat "$CARGO_HOME/.crates.toml"
grep -F "cargo-binstall 0.12.0 $source" <"$CARGO_HOME/.crates.toml"
# Install cargo-watch using `--git`
"./$1" binstall --force --git "file://$GIT" --no-confirm cargo-watch
cargo_watch_version="$(cargo watch -V)"
echo "$cargo_watch_version"
[ "$cargo_watch_version" = "cargo-watch 8.4.0" ]
cat "$CARGO_HOME/.crates.toml"
grep -F "cargo-watch 8.4.0 $source" <"$CARGO_HOME/.crates.toml"