You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fixes#1770
---
**Stack**:
- #1846
- #1836
- #1842 ⬅
⚠️ *Part of a stack created by [spr](https://github.com/ejoffe/spr). Do
not merge manually using the UI - doing so may have unexpected results.*
Copy file name to clipboardexpand all lines: website/docs/registries/publishing.md
+26-6
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,11 @@ Once uploaded, it will be available for other users to download and use.
7
7
8
8
To upload your package, use the scarb publish command.
9
9
By default, this command will publish your package to the official [scarbs.xyz](https://scarbs.xyz) registry.
10
-
The publish command automatically [packages and verifies](#packaging-your-package) your package, so there is no need to run `scarb package` beforehand.
10
+
The publish command automatically [packages and verifies](#packaging-your-package) your package, so there is no need to
11
+
run `scarb package` beforehand.
11
12
12
-
To publish your package to a registry that supports package publishing, you need to authenticate using an API token with the `publish` scope.
13
+
To publish your package to a registry that supports package publishing, you need to authenticate using an API token with
14
+
the `publish` scope.
13
15
First, log in to the registry and [in the dashboard](https://scarbs.xyz/dashboard) generate the API token.
14
16
Scarb will use the token to authenticate and complete the publishing process.
15
17
The token must be provided via the `SCARB_REGISTRY_AUTH_TOKEN` environment variable.
@@ -44,17 +46,35 @@ publish = false
44
46
45
47
Use the `scarb package` command to create an archive of your package.
46
48
You can read about the package compression algorithm and contents in the [Package tarball](./package-tarball) section.
47
-
Basically when you run the command, Scarb gathers the source code of your package along with metadata files, such as the manifest file, and places them in an archive in `target/package` directory.
49
+
Basically when you run the command, Scarb gathers the source code of your package along with metadata files, such as the
50
+
manifest file, and places them in an archive in `target/package` directory.
48
51
49
-
If you are in a Git repository, Scarb will first check if the repo state is clean and error out in case of any changes present in the Git working directory.
52
+
If you are in a Git repository, Scarb will first check if the repo state is clean and error out in case of any changes
53
+
present in the Git working directory.
50
54
To bypass this check, you can use the `--allow-dirty` flag.
51
55
52
56
The next step is package verification.
53
-
After creating the initial archive, Scarb will attempt to unpack it and compile to check for any corruptions in the packaging process.
57
+
After creating the initial archive, Scarb will attempt to unpack it and compile to check for any corruptions in the
58
+
packaging process.
54
59
If you want to speed up the packaging process, you can disable this step using the `--no-verify` flag.
55
60
56
61
> [!WARNING]
57
62
> This is a dangerous operation as it can lead to uploading a corrupted package to the registry.
58
63
> Please use with caution.
59
64
60
-
After successfully completing the whole process, the `{name}-{version}.tar.zst` archive waits in the `target/package` directory for being uploaded, where both `name` and `version` correspond to the values in `Scarb.toml`.
65
+
After successfully completing the whole process, the `{name}-{version}.tar.zst` archive waits in the `target/package`
66
+
directory for being uploaded, where both `name` and `version` correspond to the values in `Scarb.toml`.
67
+
68
+
### Files included in the package
69
+
70
+
All files in the package directory are included in the resulting tarball, except for the following:
71
+
72
+
- Files excluded with rules defined in any `.scarbignore`, `.gitignore` or `.ignore` files.
73
+
- The `<package root>/target` directory.
74
+
- Any subdirectories containing `Scarb.toml` file.
75
+
- The `.git` directory.
76
+
- Symlinks within the package directory are followed, while symlinks outside are ignored.
77
+
- File system boundaries are not crossed.
78
+
79
+
Files that would be otherwise ignored by the rules listed above, can still be included
80
+
with [include](../reference/manifest.md#include) field.
0 commit comments