Personal dev scripts installable as an npm package via GitHub.
npm install --save-dev github:PaviSF/Dev-ScriptsLists changed files in the current git repo.
# Show working directory changes
npx changed-files
# Compare between two commits/branches
npx changed-files <commit1> <commit2>Output includes a line-by-line list, a space-separated quoted list, and a total file count.
Interactively delete a local and/or remote git branch. Requires fzf.
# Pick a branch interactively
npx delete-branch
# Delete a specific branch
npx delete-branch <branch-name>Run EAS OTA updates across multiple channels, versions, and platforms (android + ios) in one command.
npx ota -c <channel...> -v <version...> [-m "message"]Examples:
npx ota -c staging -v 1.0.0
npx ota -c production -v 1.0.0 1.1.0 1.2.0
npx ota -c staging production -v 1.0.0
npx ota -c staging -v 1.0.0 -m "fix: crash on login"If no message is provided, it uses the last git commit message and asks if you want to change it.
Requirements
This script sets
APP_VERSIONas an environment variable before running the EAS update. For this to work, your project must:
- Use
app.config.tsorapp.config.jsinstead ofapp.json- Read the app version from
process.env.APP_VERSIONExample
app.config.ts:export default { expo: { version: process.env.APP_VERSION || "1.0.0", // ...rest of config }, };
After installing, add to your project's scripts:
"scripts": {
"changed-files": "changed-files",
"delete-branch": "delete-branch",
"ota": "ota -c staging -v 1.0.0"
}Then run with npm run <script-name>.
- Drop a
.shor.jsfile intoscripts/ - Commit —
package.jsonbin entries update automatically via a pre-commit hook - Push