Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web: Ignore .swc directory when computing web SHA (#29892)
Ignore any `.swc` directories when computing the SHA of SHAs to determine if `make ensure-webassets` should rebuild the web UI. The `.swc` directories are in the `.gitignore` file, so should also be ignored when computing the SHA of the web files. On a fresh checkout of `teleport`, running `make ensure-webassets` causes a plugin to be build or downloaded into `web/packages/teleport/.swc/plugins/v4`. As this is inside the directory over which the SHA of SHAs is computed, if you re-run `make ensure-webassets`, it ends up rebuilding the web UI for the same result. It should not rebuild the web UI if it hasn't changed. The SHA of SHAs generated from a fresh checkout of teleport should match another fresh checkout. This fails as generating the enterprise webassets after generating the OSS webassets includes the plugin as part of the SHA, and that is not there on a fresh checkin. This will make a difference if we want to build the web assets as a separate step on CI so that the `webassets` directory can be copied into other builds. This will allow a later version of node.js to be used to build the web UI that what may be available on the OS we're building Teleport on (I'm looking at you, Centos 7). Fix a shellcheck-reported issue of quoting while we're here.
- Loading branch information