Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Add publish all packages bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jianghao Lu committed Jun 10, 2015
1 parent a840c8a commit e9e6c8c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tasks/publishall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

if [[ $(pwd) == *tasks ]]; then
cd ../
fi
cd lib/services
published=""
failed=""
for p in $(ls -d */); do
cd $p
ret=$(npm publish)
if [ ret == 0 ]; then
published="$published, $p"
else
failed="$failed, $p"
fi
cd ..
done
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
echo -e "${GREEN}Published packages:${NC} $published"
echo -e "${RED}Failed packages:${NC} $failed"

0 comments on commit e9e6c8c

Please sign in to comment.