Skip to content

Commit eaacf82

Browse files
committed
Build: Update prepare-release for use with grunt.
1 parent 5ec0dd8 commit eaacf82

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

build/release/prepare-release

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ echo "------------------------"
4545
echo
4646

4747
# NOTE: this will be different for minor and major releases
48-
version_new=`cat version.txt`
48+
version_new=`node -e "console.log(require(\"${repo_dir}/package\").version)"`
4949
version_new=${version_new:0:$((${#version_new} - 3))}
5050
major_minor=${version_new%.*}
5151
point=${version_new##*.}
@@ -154,21 +154,23 @@ echo "| UPDATING VERSION |"
154154
echo "--------------------"
155155
echo
156156

157-
echo "Updating version.txt to $version_new..."
158-
echo $version_new > version.txt
157+
echo "Updating package.json to $version_new..."
158+
sed "s/\(version\": \"\)\([^\"]*\)/\1${version_new}/" < package.json > _package.json
159+
mv _package.json package.json
159160

160161
git commit -a -m "Tagging the $version_new release."
161162
version_new_time=`git log -1 --pretty=format:"%ad"`
162-
echo "Committed version.txt at $version_new_time..."
163+
echo "Committed package.json at $version_new_time..."
163164

164165
echo "Tagging $version_new..."
165166
git tag $version_new
166167

167-
echo "Updating version.txt to $version_next..."
168-
echo $version_next > version.txt
168+
echo "Updating package.json to $version_next..."
169+
sed "s/\(version\": \"\)\([^\"]*\)/\1${version_next}/" < package.json > _package.json
170+
mv _package.json package.json
169171

170172
git commit -a -m "Updating the $git_branch version to $version_next"
171-
echo "Committed version.txt..."
173+
echo "Committed package.json..."
172174

173175
echo
174176
echo "Version update complete."
@@ -239,16 +241,14 @@ echo
239241
# check out the tagged version
240242
echo "Checking out $version_new..."
241243
git checkout $version_new
242-
cd build
243244

244-
# Update the link to the docs (never contains the patch version)
245-
echo "Updating URL for API docs..."
246-
sed "s/UI\/API\/\${release\.version}/UI\/API\/$major_minor/" build.xml >build.xml.tmp
247-
mv build.xml.tmp build.xml
245+
# install dependencies
246+
echo "Installing dependencies..."
247+
npm install
248248

249249
# Run the build
250250
echo "Running build..."
251-
ant
251+
grunt release
252252

253253
echo
254254
echo "Build complete."
@@ -300,7 +300,7 @@ svn co --depth immediates https://jquery-ui.googlecode.com/svn/tags
300300
cd tags
301301

302302
echo "Unzipping build into tags/$version_new..."
303-
unzip $repo_dir/build/dist/jquery-ui-$version_new.zip
303+
unzip $repo_dir/dist/jquery-ui-$version_new.zip
304304
mv jquery-ui-$version_new $version_new
305305

306306
echo "Adding files to SVN..."
@@ -328,7 +328,7 @@ echo
328328

329329
#
330330
# Generate themes
331-
#
331+
#
332332

333333

334334

0 commit comments

Comments
 (0)