Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Set root of file paths so scripts can be run from any locaiton
  • Loading branch information
jimschubert committed Jun 5, 2019
commit bebc9f130483f521c9b01a1befb2d0f9873ce4c8
27 changes: 14 additions & 13 deletions bin/utils/release/release_version_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#

declare cwd=$(cd $(dirname "${BASH_SOURCE}") && pwd)
declare root=$(cd "$cwd" && cd ../../../ && pwd)

USAGE="
USAGE: $0 target
Expand Down Expand Up @@ -71,22 +72,22 @@ echo "Release preparation: Moving from $version to next $inc version."
# These files should wrap target version replacement blocks with <!-- RELEASE_VERSION --> and <!-- /RELEASE_VERSION -->
# We can include xml and md files here.
declare -a xml_files=("modules/openapi-generator-cli/pom.xml"
"modules/openapi-generator-gradle-plugin/pom.xml"
"modules/openapi-generator-core/pom.xml"
"modules/openapi-generator-maven-plugin/pom.xml"
"modules/openapi-generator-online/pom.xml"
"modules/openapi-generator/pom.xml"
"modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml"
"modules/openapi-generator-maven-plugin/examples/java-client.xml"
"modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
"modules/openapi-generator-maven-plugin/examples/non-java.xml"
"samples/meta-codegen/lib/pom.xml"
"pom.xml")
"${root}/modules/openapi-generator-gradle-plugin/pom.xml"
"${root}/modules/openapi-generator-core/pom.xml"
"${root}/modules/openapi-generator-maven-plugin/pom.xml"
"${root}/modules/openapi-generator-online/pom.xml"
"${root}/modules/openapi-generator/pom.xml"
"${root}/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml"
"${root}/modules/openapi-generator-maven-plugin/examples/java-client.xml"
"${root}/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
"${root}/modules/openapi-generator-maven-plugin/examples/non-java.xml"
"${root}/samples/meta-codegen/lib/pom.xml"
"${root}/pom.xml")

# These files should wrap target version replacement blocks with # RELEASE_VERSION and # /RELEASE_VERSION
declare -a properties_files=(
"modules/openapi-generator-gradle-plugin/gradle.properties"
"modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties"
"${root}/modules/openapi-generator-gradle-plugin/gradle.properties"
"${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties"
)

${cwd}/bump.sh -f ${version} -i ${inc} ${xml_files[@]}
Expand Down
9 changes: 5 additions & 4 deletions bin/utils/release/release_version_update_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#

declare cwd=$(cd $(dirname "${BASH_SOURCE}") && pwd)
declare root=$(cd "$cwd" && cd ../../../ && pwd)

USAGE="
USAGE: $0 [version] target
Expand Down Expand Up @@ -101,13 +102,13 @@ else
fi

declare -a xml_files=(
"modules/openapi-generator-maven-plugin/README.md"
"modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
"README.md"
"${root}/modules/openapi-generator-maven-plugin/README.md"
"${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
"${root}/README.md"
)

declare -a commented_files=(
"modules/openapi-generator-gradle-plugin/README.adoc"
"${root}/modules/openapi-generator-gradle-plugin/README.adoc"
)

${cwd}/bump.sh ${ags} ${xml_files[@]}
Expand Down