PromucFlow_constructor/app/client/build.sh
Valera Melnikov f25eb88754
chore: separation of client build steps (#24506)
## Description
Separation to different steps of running lint, prettier, and jest unit
tests

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [x] Manual
- [x] Jest
- [x] Cypress

## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag

Co-authored-by: Valera Melnikov <melnikov.vv@greendatasoft.ru>
2023-06-16 09:03:56 +03:00

30 lines
745 B
Bash
Executable File

#!/bin/bash
set -e
GIT_SHA=$(eval git rev-parse HEAD)
echo $GIT_SHA
echo "Sentry Auth Token: $SENTRY_AUTH_TOKEN"
if [ "$REACT_APP_AIRGAP_ENABLED" == "true" ]; then
echo "Building for airgapped Appsmith instances"
node download-assets.js;
OUTPUT_PATH=build_airgap
else
echo "Building for non-airgapped Appsmith instances"
OUTPUT_PATH=build
fi
# build cra app
export REACT_APP_SENTRY_RELEASE=$GIT_SHA
export REACT_APP_CLIENT_LOG_LEVEL=ERROR
craco --max-old-space-size=7168 build --config craco.build.config.js
if [ "$GITHUB_REPOSITORY" == "appsmithorg/appsmith-ee" ]; then
echo "Deleting sourcemaps for EE"
rm ./$OUTPUT_PATH/static/js/*.js.map
rm ./$OUTPUT_PATH/static/js/*.js.map.gz
fi
echo "build finished"