Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix gen.sh to work with different numbers of version components

  • Loading branch information...
commit f6ff962000c39329c03cf00a380f539e89c37997 1 parent ae57966
@prefiks prefiks authored
Showing with 11 additions and 9 deletions.
  1. +11 −9 tools/gen.sh
View
20 tools/gen.sh
@@ -29,16 +29,16 @@ function build () {
XPI_URL "https://download.process-one.net/oneteam/$2/oneteam.xpi" \
|| { rm -f update.lock; exit; }
- rm ../../public_html/oneteam/$2/*.xulapp \
- ../../public_html/oneteam/$2/*-partial.mar \
- ../../public_html/oneteam/$2/*.xpi 2>/dev/null
- cp *.xulapp *.mar *.xpi update.rdf ../../public_html/oneteam/$2/
+ rm ../build/$2/*.xulapp \
+ ../build/$2/*-partial.mar \
+ ../build/$2/*.xpi 2>/dev/null
+ cp *.xulapp *.mar *.xpi update.rdf ../build/$2/
perl -e '
@files = map { $_->[1] }
sort { $a->[0] cmp $b->[0] }
- map { my $x = $_; $x =~ s/(\d+)/sprintf "%010d", $1/ge; [$x, $_] }
- glob("../../public_html/oneteam/$ARGV[0]/*.mar");
+ map { my $x = $_; $x =~ s/.*?(\d+(?:\.\d+)+).*/$1/; $x =~ s/(\d+)/sprintf "%010d", $1/ge; [$x, $_] }
+ glob("../build/$ARGV[0]/*.mar");
while (@files > 8) {
unlink shift @files;
@@ -59,15 +59,17 @@ function build () {
' $2
cp mars-info.txt ..
- rsync -a --delete ../../public_html/oneteam/$2/ s2:download.process-one.net/$2/
- scp mars-info.txt s2:download.process-one.net/mars-info-$2.txt
+ if test "$2" != "release"; then
+ rsync -a --delete ../build/$2/ s2:download.process-one.net/$2/
+ scp mars-info.txt s2:download.process-one.net/mars-info-$2.txt
+ fi
}
git pull -q >/dev/null 2>/dev/null
build remotes/origin/master devel "$1"
-git for-each-ref --format '%(refname)' 'refs/tags/' | while read tag; do
+git for-each-ref --format '%(refname)' 'refs/tags/*' | while read tag; do
build $tag release ""
done
Please sign in to comment.
Something went wrong with that request. Please try again.