1
0
mirror of https://github.com/1C-Company/v8-code-style.git synced 2024-12-01 10:41:05 +02:00
v8-code-style/bom/set_version.sh
Dmitriy Marmyshev f4095b1141 Версия 0.5
2023-03-10 02:57:34 -08:00

31 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
#*******************************************************************************
# Copyright (C) 2020 1C-Soft LLC and others.
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# 1C-Soft LLC - initial API and implementation
#*******************************************************************************
current_version='0.4.0'
new_version='0.5.0'
next_version='0.6.0'
find . -name 'pom.xml' -exec sed -i '' "s/${current_version}-SNAPSHOT/${new_version}-SNAPSHOT/g" {} +
find . -name 'MANIFEST.MF' -exec sed -i '' "s/Bundle-Version: ${current_version}.qualifier/Bundle-Version: ${new_version}.qualifier/g" {} +
find . -name 'MANIFEST.MF' -exec sed -i '' "s/\(com\.e1c\.v8codestyle[\.a-z0-9]*;version=\"\)\([\.0-9]*\)\"/\1${new_version}\"/g" {} +
find . -name 'MANIFEST.MF' -exec sed -i '' "s/\(com\.e1c\.v8codestyle[\.a-z0-9]*;version=\"\[\)\([\.,0-9]*)\"\)/\1${new_version},${next_version})\"/g" {} +
find . -name 'MANIFEST.MF' -exec sed -i '' "s/\(com\.e1c\.v8codestyle[\.a-z0-9]*;bundle-version=\"\[\)\([\.,0-9]*)\"\)/\1${new_version},${next_version})\"/g" {} +
find . -name 'category.xml' -exec sed -i '' "s/${current_version}.qualifier/${new_version}.qualifier/g" {} +
find . -name 'feature.xml' -exec sed -i '' "s/version=\"${current_version}.qualifier\"/version=\"${new_version}.qualifier\"/g" {} +