Skip to content

Commit c2ef626

Browse files
CoveMBericglau
andauthored
[Stellar] download rust package gitignore (#726)
Co-authored-by: Eric Lau <ericglau@outlook.com>
1 parent d85b3ba commit c2ef626

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

packages/core/stellar/src/utils/compile-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const runRustCompilationTest = withTemporaryFolderDo(
5656
`contracts/${scaffoldContractName}/Cargo.toml`,
5757
'Cargo.toml',
5858
'README.md',
59+
'.gitignore',
5960
];
6061

6162
const zip = await zipRustProject(makeContract(opts), opts);

packages/core/stellar/src/zip-rust.compile.test.ts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,6 @@ Generated by [AVA](https://avajs.dev).
138138
- See [Rust and Stellar installation guide](https://developers.stellar.org/docs/build/smart-contracts/getting-started/setup).␊
139139
- See [Git installation guide](https://github.com/git-guides/install-git).␊
140140
`,
141+
`target/␊
142+
`,
141143
]
19 Bytes
Binary file not shown.

packages/core/stellar/src/zip-rust.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Continue your development journey with [Stellar CLI](https://github.com/stellar/
2525
- See [Git installation guide](https://github.com/git-guides/install-git).
2626
`;
2727

28+
const gitIgnore = `\
29+
target/
30+
`;
31+
2832
export const createRustZipEnvironment = (c: Contract, opts: GenericOptions) => {
2933
const zip = new JSZip();
3034

@@ -35,6 +39,7 @@ export const createRustZipEnvironment = (c: Contract, opts: GenericOptions) => {
3539
zip.file(`contracts/${contractName}/src/lib.rs`, createRustLibFile);
3640
zip.file(`contracts/${contractName}/Cargo.toml`, printContractCargo(contractName));
3741
zip.file('Cargo.toml', workspaceCargo);
42+
zip.file('.gitignore', gitIgnore);
3843

3944
return zip;
4045
};

packages/core/stellar/src/zip-scaffold.compile.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const runScaffoldCompilationTest = withTemporaryFolderDo(
2727

2828
const expectedZipFiles = [
2929
'Cargo.toml',
30+
'.gitignore',
3031
`contracts/${scaffoldContractName}/src/contract.rs`,
3132
`contracts/${scaffoldContractName}/src/test.rs`,
3233
`contracts/${scaffoldContractName}/src/lib.rs`,

0 commit comments

Comments
 (0)