Skip to content

Commit

Permalink
add versioning script
Browse files Browse the repository at this point in the history
  • Loading branch information
soumith committed Jul 29, 2016
1 parent e856c86 commit 208e1fa
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions rocks/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
cd "$(dirname "$0")"
fname=$(ls|grep rockspec|grep -v scm | sort -r -V|head -n1)
echo "Last known version: $fname"
luarocks new_version $fname

new_fname=$(ls|grep rockspec|grep -v scm | sort -r -V|head -n1)
new_version=$(echo $new_fname | cut -f2,3,4,5 -d'-'|sed -e 's/.rockspec//g')
echo "new rockspec: $new_fname"
echo "new version: $new_version"
git add $new_fname
git commit -m "Cutting version $new_version"
git branch $new_version

git push origin master:master
git push origin $new_version:$new_version

git clone https://github.com/torch/rocks
cp $new_fname rocks/
cd rocks
th make-manifest.lua
git add $new_fname
git commit -am "adding rockspec $new_fname"
git push
cd ..
rm -rf rocks
cd ..

0 comments on commit 208e1fa

Please sign in to comment.