diff options
author | Florian Barca <fbarca@hortonworks.com> | 2015-03-31 14:08:35 -0700 |
---|---|---|
committer | Florian Barca <fbarca@hortonworks.com> | 2015-03-31 14:08:35 -0700 |
commit | f72e0bdb1df87242a144fbd43cef462c17f73de1 (patch) | |
tree | e61bb9d5343cc9b92f58d84e47dbc8503ff0ef2c /ambari-web/set-ambari-version.ps1 | |
parent | de97e38cd747ab25793531a3d8a508f08d027867 (diff) |
AMBARI-10243 [WinTP2] ambari-web build is incomplete
Replaced maven-antrun-plugin with exec-maven-plugin. Upgraded to v1.2.1 was necessary because v1.2 doesn't process the <successCodes> tag.
Created Windows scripts with identical functionality for set-ambari-version.sh, set-default-stack-version.sh and toggle-experimental.sh.
Fixed slider view build.
Diffstat (limited to 'ambari-web/set-ambari-version.ps1')
-rw-r--r-- | ambari-web/set-ambari-version.ps1 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ambari-web/set-ambari-version.ps1 b/ambari-web/set-ambari-version.ps1 new file mode 100644 index 0000000000..a69df44c64 --- /dev/null +++ b/ambari-web/set-ambari-version.ps1 @@ -0,0 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$newVersion = $($args[0]) + +if ($newVersion -ne '${ambariVersion}') +{ + "Setting Ambari version to $newVersion" + Get-Content public/javascripts/app.js -ReadCount 1000 | %{$_ -replace "App.version.*=.*;","App.version = '$newVersion';"} | Set-Content public/javascripts/tmp.js + Move-Item ./public/javascripts/tmp.js ./public/javascripts/app.js -force +} |