Skip to content

Commit

Permalink
Fix test e2e script (#37081)
Browse files Browse the repository at this point in the history
  • Loading branch information
fortmarek authored and kelset committed Apr 25, 2023
1 parent 5834cea commit 4979381
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/test-manual-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,22 @@ init_template_app(){

success "Preparing version $PACKAGE_VERSION"

npm pack

TIMESTAMP=$(date +%s)
PACKAGE=$(pwd)/react-native-$PACKAGE_VERSION-$TIMESTAMP.tgz
success "Package bundled ($PACKAGE)"

mv "$(pwd)/react-native-$PACKAGE_VERSION.tgz" "$PACKAGE"

node scripts/set-rn-template-version.js "file:$PACKAGE"
success "React Native version changed in the template"

npm pack
success "Package bundled ($PACKAGE)"

mv "$(pwd)/react-native-$PACKAGE_VERSION.tgz" "$PACKAGE"

project_name="RNTestProject"

pushd /tmp/ >/dev/null || exit
rm -rf "$project_name"
node "$repo_root/cli.js" init "$project_name" --template "$repo_root"
node "$repo_root/cli.js" init "$project_name" --template "$PACKAGE"

info "Double checking the versions in package.json are correct:"
grep "\"react-native\": \".*react-native-$PACKAGE_VERSION-$TIMESTAMP.tgz\"" "/tmp/${project_name}/package.json" || error "Incorrect version number in /tmp/${project_name}/package.json"
Expand Down

0 comments on commit 4979381

Please sign in to comment.