diff --git a/package.json b/package.json index a260130..a5681cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-run-script", - "version": "1.1.1", + "version": "1.1.2", "description": "Run a script on multiple repositories, cloning them if needed.", "main": "dist/index.js", "type": "commonjs", diff --git a/src/templates/cp.ts b/src/templates/cp.ts index c7f57d5..8974e7a 100644 --- a/src/templates/cp.ts +++ b/src/templates/cp.ts @@ -38,10 +38,11 @@ export default class CpTemplate implements Template { #!/bin/bash $FILE="${source_file}" $RELATIVE_DEST="${dest_path}" +$COMMIT_MESSAGE="${commit_message}" git pull -cp -r $FILE $RELATIVE_DEST -git add $RELATIVE_DEST -git commit -m "${commit_message}" +cp -r $FILE "$RELATIVE_DEST" +git add "$RELATIVE_DEST" +git commit -m "$COMMIT_MESSAGE" git push `; const outputPath = await getOutputPath(this, flags);