Skip to content

Commit

Permalink
minor: fixed formatting for script files
Browse files Browse the repository at this point in the history
  • Loading branch information
rnveach committed Dec 7, 2022
1 parent 282344a commit 57ff465
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .ci/bump-cs-version-in-sevntu-checks.sh
Expand Up @@ -9,6 +9,7 @@ fi

VERSION=$1
cd sevntu-checks
mvn -e --no-transfer-progress versions:set-property -DgenerateBackupPoms=false -Dproperty=checkstyle.version -DnewVersion="$VERSION"
mvn -e --no-transfer-progress versions:set-property -DgenerateBackupPoms=false \
-Dproperty=checkstyle.version -DnewVersion="$VERSION"

echo "Version updated to $VERSION at sevntu-checks/pom.xml"
3 changes: 2 additions & 1 deletion .ci/bump-cs-version-in-sonar-plugin.sh
Expand Up @@ -10,6 +10,7 @@ fi
VERSION=$1
cd sevntu-checkstyle-sonar-plugin

mvn -e --no-transfer-progress versions:set-property -DgenerateBackupPoms=false -Dproperty=checkstyle.version -DnewVersion="$VERSION"
mvn -e --no-transfer-progress versions:set-property -DgenerateBackupPoms=false \
-Dproperty=checkstyle.version -DnewVersion="$VERSION"

echo "Version updated to $VERSION at sevntu-checkstyle-sonar-plugin/pom.xml"
72 changes: 45 additions & 27 deletions .ci/checks-no-exception.sh
Expand Up @@ -17,8 +17,9 @@ checkstyle)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
Expand All @@ -28,7 +29,8 @@ checkstyle)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand All @@ -41,8 +43,9 @@ struts)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
Expand All @@ -52,7 +55,8 @@ struts)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand All @@ -65,8 +69,9 @@ guava)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
Expand All @@ -76,7 +81,8 @@ guava)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand All @@ -89,8 +95,9 @@ hibernate-orm)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
Expand All @@ -100,7 +107,8 @@ hibernate-orm)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand All @@ -113,8 +121,9 @@ spotbugs)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
Expand All @@ -124,7 +133,8 @@ spotbugs)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand All @@ -137,8 +147,9 @@ spring-framework)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
Expand All @@ -148,7 +159,8 @@ spring-framework)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand All @@ -161,8 +173,9 @@ hbase)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
Expand All @@ -172,7 +185,8 @@ hbase)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand All @@ -185,8 +199,9 @@ pmd-elasticsearch-lombok-ast)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from "https://github.com/checkstyle/contribution.git"
Expand All @@ -198,7 +213,8 @@ pmd-elasticsearch-lombok-ast)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand All @@ -211,8 +227,9 @@ alot-of-projects)
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
checkout_from https://github.com/checkstyle/contribution.git
Expand All @@ -227,7 +244,8 @@ alot-of-projects)
groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \
--patchConfig checks-sevntu-error.xml --allowExcludes \
--mode single --patchBranch "$BRANCH" -r ../../..\
-xm "-Dcheckstyle.version=${CS_POM_VERSION} -Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-xm "-Dcheckstyle.version=${CS_POM_VERSION} \
-Dsevntu-checkstyle.version=${SEVNTU_POM_VERSION} \
-Dcheckstyle.failsOnError=false"
cd ../../
rm -rf contribution
Expand Down
15 changes: 9 additions & 6 deletions .ci/validation.sh
Expand Up @@ -61,7 +61,8 @@ all-sevntu-checks-contribution)
| grep -vE "Checker|TreeWalker|Filter|Holder" | grep -v "^$" \
| sed "s/com\.github\.sevntu\.checkstyle\.checks\..*\.//" \
| sort | uniq | sed "s/Check$//" > .ci-temp/web.txt
xmlstarlet sel --net --template -m .//module -v "@name" -n sevntu-checks/config/sevntu-checks.xml \
xmlstarlet sel --net --template -m .//module -v "@name" \
-n sevntu-checks/config/sevntu-checks.xml \
| grep -vE "Checker|TreeWalker|Filter|Holder" | grep -v "^$" \
| sed "s/com\.github\.sevntu\.checkstyle\.checks\..*\.//" \
| sort | uniq | sed "s/Check$//" > .ci-temp/file.txt
Expand All @@ -84,20 +85,22 @@ checkstyle-regression)
checkout_from "https://github.com/checkstyle/checkstyle"
# update checkstyle_sevntu_checks.xml file in checkstyle for new modules
cd sevntu-checks
SEVNTU_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${project.version}' --non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo sevntu version:$SEVNTU_VERSION
ECLIPSE_CS_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo eclipse-cs version:$ECLIPSE_CS_VERSION
mvn -e --no-transfer-progress install -Pno-validations
mvn -e --no-transfer-progress test -Dtest=CheckstyleRegressionTest#setupFiles -Dregression-path=../.ci-temp
mvn -e --no-transfer-progress test -Dtest=CheckstyleRegressionTest#setupFiles \
-Dregression-path=../.ci-temp
cd ../
# execute checkstyle validation on updated config file
cd .ci-temp/checkstyle
mvn -e --no-transfer-progress clean verify -DskipTests -DskipITs -Dpmd.skip=true -Dspotbugs.skip=true \
-Dfindbugs.skip=true -Djacoco.skip=true -Dxml.skip=true \
mvn -e --no-transfer-progress clean verify -DskipTests -DskipITs -Dpmd.skip=true \
-Dspotbugs.skip=true -Dfindbugs.skip=true -Djacoco.skip=true -Dxml.skip=true \
-Dmaven.sevntu-checkstyle-check.checkstyle.version=$ECLIPSE_CS_VERSION \
-Dmaven.sevntu.checkstyle.plugin.version=$SEVNTU_VERSION
;;
Expand Down
21 changes: 13 additions & 8 deletions deploy.sh
Expand Up @@ -73,7 +73,8 @@ deployEclipse()
cd $SEVNTU_DIR
#echo -n "Enter version number: "
#read version
#mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$version -f eclipse-pom.xml
#mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$version \
#-f eclipse-pom.xml
mvn -e --no-transfer-progress clean install -f eclipse-pom.xml -Plocal-deploy
if [ "$?" != "0" ]
then
Expand All @@ -92,12 +93,13 @@ deployMavenLibrary()
{
echo "Deploying Sevntu Checks"
# As we do not use SNAPSHOT qualifier for development in pom.xml
# we have to deploy library sevntu-checks always even it overrides existing binaries in maven repository
# for release build - it will not override binaries
# we have to deploy library sevntu-checks always even it overrides existing binaries
# in maven repository for release build - it will not override binaries
# for test build - it will override as we need to be sure that in repository,
# we have previous release version but compiled with from new code
cd $SEVNTU_DIR/sevntu-checks
mvn -e --no-transfer-progress clean javadoc:javadoc deploy -Plocal-deploy -DdeployDir=$GH_SEVNTU_HOMR_DIR
mvn -e --no-transfer-progress clean javadoc:javadoc deploy -Plocal-deploy \
-DdeployDir=$GH_SEVNTU_HOMR_DIR
if [ "$?" != "0" ]
then
echo "build for $SEVNTU_DIR/sevntu-checks."
Expand All @@ -106,7 +108,9 @@ deployMavenLibrary()
# deployment of Javadoc to static site
cp -rf target/site/apidocs $GH_SEVNTU_HOMR_DIR

# no need push to repository only library it should be done together with IDE plugins release
# no need push to repository only library it should be done together with IDE plugins
# release

#cd $GH_SEVNTU_HOMR_DIR
#echo "$manualDeploy"
return
Expand All @@ -116,8 +120,8 @@ deployToMavenCentral()
{
echo "Deploying All to Maven Central"
# As we do not use SNAPSHOT qualifier for development in pom.xml
# we have to deploy library sevntu-checks always even it overrides existing binaries in maven repository
# for release build - it will not override binaries
# we have to deploy library sevntu-checks always even it overrides existing binaries
# in maven repository for release build - it will not override binaries
# for test build - it will override as we need to be sure that in repository,
# we have previous release version but compiled with from new code
cd $SEVNTU_DIR/sevntu-checks
Expand All @@ -141,7 +145,8 @@ deploySonar()
{
echo "Deploying Sonar"
cd $SEVNTU_DIR/sevntu-checkstyle-sonar-plugin/
mvn -e --no-transfer-progress clean install wagon:upload-single -DdeployDir=$GH_SEVNTU_HOMR_DIR
mvn -e --no-transfer-progress clean install wagon:upload-single \
-DdeployDir=$GH_SEVNTU_HOMR_DIR
if [ "$?" != "0" ]
then
echo "build for $SEVNTU_DIR/sevntu-checkstyle-sonar-plugin/"
Expand Down

0 comments on commit 57ff465

Please sign in to comment.