Skip to content

Commit

Permalink
Generalized the shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
ijlee2 committed Jun 13, 2023
1 parent 96d21e9 commit ccd06d8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env sh

COMMAND="ember-codemod-v1-to-v2"
ENVIRONMENT=$1

if [ $ENVIRONMENT = "--production" ]
Expand All @@ -11,8 +12,12 @@ then
tsc --project "tsconfig.build.json"

# Configure files
chmod +x "dist/bin/ember-codemod-v1-to-v2.js"
cp -r "src/blueprints" "dist/src/blueprints"
chmod +x "dist/bin/$COMMAND.js"

if [ -d "src/blueprints" ]
then
cp -r "src/blueprints" "dist/src/blueprints"
fi

echo "SUCCESS: Built dist.\n"

Expand All @@ -25,7 +30,10 @@ then
tsc --project "tsconfig.json"

# Configure files
cp -r "src/blueprints" "dist-for-testing/src/blueprints"
if [ -d "src/blueprints" ]
then
cp -r "src/blueprints" "dist-for-testing/src/blueprints"
fi

echo "SUCCESS: Built dist-for-testing.\n"

Expand Down

0 comments on commit ccd06d8

Please sign in to comment.