forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description - Adds `build/*` to `.gitignore` when invoking `sui move new` (extending it if it already exists) - Splits out `move new` implementation into smaller functions ## Test plan I added to the `move new` unit tests; checking the case where the `.gitignore` already exists, and extended the existing tests to check that it was added. Note that I didn't add tests to `sui move new`, only `move new`. --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [x] CLI: When issuing `sui move new` command, a `.gitignore` file will be added to the project's folder. - [ ] Rust SDK: - [ ] REST API:
- Loading branch information
1 parent
09d8ed3
commit edf7a29
Showing
6 changed files
with
65 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
external-crates/move/crates/move-cli/tests/build_tests/new_clobber/gitignore_exists/args.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Command `new -p package example`: | ||
External Command `cat package/.gitignore`: | ||
existing_ignore | ||
build/* | ||
External Command `ls -A package`: | ||
.gitignore | ||
Move.toml | ||
sources |
4 changes: 4 additions & 0 deletions
4
external-crates/move/crates/move-cli/tests/build_tests/new_clobber/gitignore_exists/args.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# if `.gitignore` exists, everything should be created and .gitignore should be extended | ||
new -p package example | ||
>cat package/.gitignore | ||
>ls -A package |
1 change: 1 addition & 0 deletions
1
...es/move/crates/move-cli/tests/build_tests/new_clobber/gitignore_exists/package/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
existing_ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...cli/tests/build_tests/simple_new/args.txt → ...cli/tests/build_tests/new_simple/args.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
new P1 | ||
> cat P1/Move.toml | ||
> cat P1/.gitignore | ||
|
||
new P2 -p other_dir | ||
> cat other_dir/Move.toml | ||
> cat other_dir/.gitignore |