exec icon indicating copy to clipboard operation
exec copied to clipboard

Rsync / ZIP not found

Open dkjensen opened this issue 2 years ago • 1 comments

I'm experiencing an issue where basic commands are not found when executing from within my shell script. Rsync and ZIP namely

#!/bin/sh

if [ $# -eq 0 ]
  then
    echo "No arguments supplied"
    exit
fi

... 
Environment variables
...

echo "Syncing files..."
rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded

echo "Generating zip file..."
cd "$BUILD_PATH" || exit
zip -q -r "${SLUG}.zip" "$SLUG/"
module.exports = {
  tagFormat: "${version}",
  branch: "master",
  plugins: [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["@semantic-release/npm", { 
      npmPublish: false 
    }],
    ["@semantic-release/exec", {
      "publishCmd": "chmod +x ./bin/build-zip.sh && ./bin/build-zip.sh ${nextRelease.version}"
    }],
    ["@semantic-release/github", {
      "assets": [
        {"path": "build/build.zip", "label": "Bundle"}
      ]
    }]
  ]
};

Is this perhaps a directory or permissions issue?

dkjensen avatar Feb 08 '22 00:02 dkjensen

I'm having similar problems with this, I'm unable to execute my script even when it is the same owner and with 777 permissions. It just says it is unable to find it. Why do you perform a chmod +x before calling the script?

yevon avatar Feb 25 '24 12:02 yevon