Created
August 16, 2012 19:05
-
-
Save isao/3372714 to your computer and use it in GitHub Desktop.
diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: git-rel-pkg.sh | |
=================================================================== | |
--- git-rel-pkg.sh (revision 83346) | |
+++ git-rel-pkg.sh (working copy) | |
@@ -16,7 +16,7 @@ | |
[email protected]:yahoo/mojito.git # authenticated read/write public | |
gitdir=./mojito-$relnum | |
int_br=rel-$relnum # temp integration branch | |
-pkgjson=source/package.json | |
+pkgjson=package.json | |
message= | |
oldver= | |
newver= | |
@@ -56,7 +56,7 @@ | |
} | |
npm_pack() { | |
- (cd .. && $ynpmbin pack $gitdir/$(dirname $pkgjson)) | |
+ (cd .. && $ynpmbin pack $gitdir) | |
} | |
# | |
Index: Makefile2 | |
=================================================================== | |
--- Makefile2 (revision 83346) | |
+++ Makefile2 (working copy) | |
@@ -71,16 +71,16 @@ | |
# | |
npmi: | |
- cd $(GITDIR)/source && $(NPM_INST_CMD) | |
+ cd $(GITDIR) && $(NPM_INST_CMD) | |
lint: | |
- cd $(GITDIR) && ./source/bin/mojito jslint | |
+ cd $(GITDIR) && ./bin/mojito jslint | |
test ! -e $(GITDIR)/$(JSLINT_HTM) | |
mkdir -p `dirname $(GITDIR)/$(JSLINT_HTM)` | |
echo 'No errors.' > $(GITDIR)/$(JSLINT_HTM) | |
unit-test: | |
- cd $(GITDIR) && $(GITDIR)/source/bin/mojito test -c | |
+ cd $(GITDIR) && $(GITDIR)/bin/mojito test -c | |
package: | |
$(WORKSPACE)/env/git-npm-pkg.sh $(GITDIR) $(BRANCH) $(WORKSPACE) | |
Index: git-branch-pkg.sh | |
=================================================================== | |
--- git-branch-pkg.sh (revision 83346) | |
+++ git-branch-pkg.sh (working copy) | |
@@ -8,7 +8,7 @@ | |
[email protected]:yahoo/mojito.git # authenticated read/write public | |
gitdir=./mojito-$relnum | |
int_br=rel-$relnum # temp integration branch | |
-pkgjson=source/package.json | |
+pkgjson=package.json | |
message= | |
oldver= | |
newver= | |
@@ -44,7 +44,7 @@ | |
} | |
npm_pack() { | |
- (cd .. && $ynpmbin pack $gitdir/$(dirname $pkgjson)) | |
+ (cd .. && $ynpmbin pack $gitdir) | |
} | |
# | |
Index: git-repo-prep.sh | |
=================================================================== | |
--- git-repo-prep.sh (revision 83346) | |
+++ git-repo-prep.sh (working copy) | |
@@ -1,22 +0,0 @@ | |
-#!/bin/sh -e | |
- | |
-BRANCH=${1:-'develop'} | |
-GITURI=${2:-'git://github.com/yahoo/mojito.git'} | |
-GITDIR=${3:-'mojito.git'} | |
- | |
-[[ ! -d $GITDIR || ! -d $GITDIR/.git ]] && rm -rfv $GITDIR | |
-[[ $BRANCH != master && $BRANCH != develop ]] && rm -rfv $GITDIR | |
- | |
-if [[ ! -d $GITDIR ]] | |
-then | |
- # does mkdir -p if needed | |
- git clone --branch $BRANCH $GITURI $GITDIR | |
- | |
-else | |
- cd $GITDIR | |
- git reset --hard | |
- git clean -dfx | |
- git checkout $BRANCH | |
- git pull $GITURI $BRANCH | |
- | |
-fi | |
Index: git-npm-pkg.sh | |
=================================================================== | |
--- git-npm-pkg.sh (revision 83346) | |
+++ git-npm-pkg.sh (working copy) | |
@@ -25,7 +25,7 @@ | |
} | |
clean() { | |
- (cd $1 && git reset --hard && git clean -dxf) | |
+ (cd $1 && git reset --hard && git clean -df) | |
} | |
getver() { | |
@@ -52,12 +52,12 @@ | |
[[ -d $destdir ]] || err 5 "invalid destination dir $destdir" | |
repodir=$(cd $repodir && pwd) # convert to abs path | |
-pkgjson=$repodir/source/package.json | |
+pkgjson=$repodir/package.json | |
-clean $repodir/source || err 7 "git reset/clean failed" | |
+clean $repodir || err 7 "git reset/clean failed" | |
[[ -f $pkgjson ]] || err 9 "missing $pkgjson" | |
-gitver=$(getver $repodir/source) # github branch's commits | |
+gitver=$(getver $repodir) # github branch's commits | |
pkgver=$(readjson version $pkgjson) # orig package.json version | |
pkgname=$(readjson name $pkgjson) # orig package.json name | |
pkgfile=$pkgname-$gitver.tgz # package filename | |
@@ -78,7 +78,7 @@ | |
echo "* packaging $pkgfile" | |
cd $destdir | |
- $ynpmbin pack $(dirname $pkgjson) # makes $destdir/mojito-$gitver.tgz | |
+ $ynpmbin pack $repodir # makes $destdir/mojito-$gitver.tgz | |
ln -sfv $pkgfile $pkgname-$lnlabel-latest.tgz | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment