Using help plugin for config retrieval
This commit is contained in:
parent
e81b8c5cb6
commit
011aed509e
|
@ -26,23 +26,13 @@
|
|||
|
||||
THIS_DIR=$(dirname $0)
|
||||
THIS_DIR=$(readlink -f ${THIS_DIR})
|
||||
CONTENT_DIR=".site-content"
|
||||
BRANCH="asf-staging-3.0"
|
||||
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
|
||||
|
||||
SUB_DIR="/redback/core/${VERSION}"
|
||||
|
||||
if grep -q '<scmPublishBranch>' pom.xml; then
|
||||
BRANCH=$(sed -n -e 's/.*<scmPublishBranch>\(.*\)<\/scmPublishBranch>.*/\1/p' pom.xml)
|
||||
fi
|
||||
|
||||
if grep -q '<scmPubCheckoutDirectory>' pom.xml; then
|
||||
CONTENT_DIR=$(sed -n -e 's/.*<scmPubCheckoutDirectory>\(.*\)<\/scmPubCheckoutDirectory>.*/\1/p' pom.xml)
|
||||
fi
|
||||
|
||||
|
||||
PUBLISH_PATH=$(mvn help:evaluate -Dexpression=scmPublishPath -q -DforceStdout)
|
||||
BRANCH=$(mvn help:evaluate -Dexpression=scmPublishBranch -q -DforceStdout)
|
||||
CONTENT_DIR=$(mvn help:evaluate -Dexpression=scmPubCheckoutDirectory -q -DforceStdout)
|
||||
|
||||
if [ -d "${CONTENT_DIR}/.git" ]; then
|
||||
git -C "${CONTENT_DIR}" fetch origin
|
||||
git -C "${CONTENT_DIR}" fetch origin
|
||||
git -C "${CONTENT_DIR}" reset --hard origin/${BRANCH}
|
||||
git -C "${CONTENT_DIR}" clean -f -d
|
||||
|
@ -55,7 +45,7 @@ mvn site:stage "$@"
|
|||
echo "*****************************************"
|
||||
echo ">>>> Finished the site stage process <<<<"
|
||||
echo "> You can check the content in the folder target/staging or by opening the following url"
|
||||
echo "> file://${THIS_DIR}/target/staging${SUB_DIR}/index.html"
|
||||
echo "> file://${THIS_DIR}/target/staging${PUBLISH_PATH}/index.html"
|
||||
echo "> "
|
||||
echo "> If everything is fine enter yes. After that the publish process will be started."
|
||||
echo -n "Do you want to publish (yes/no)? "
|
||||
|
|
3
pom.xml
3
pom.xml
|
@ -96,6 +96,7 @@
|
|||
<site.staging.base>${project.basedir}</site.staging.base>
|
||||
<scmPubCheckoutDirectory>.site-content</scmPubCheckoutDirectory>
|
||||
<scmPublishBranch>asf-staging</scmPublishBranch>
|
||||
<scmPublishPath>/redback/core/${project.version}</scmPublishPath>
|
||||
<!-- The git repository, where the site content is placed -->
|
||||
<siteRepositoryUrl>scm:git:https://gitbox.apache.org/repos/asf/archiva-web-content.git</siteRepositoryUrl>
|
||||
|
||||
|
@ -753,7 +754,7 @@
|
|||
<inputEncoding>UTF-8</inputEncoding>
|
||||
<outputEncoding>UTF-8</outputEncoding>
|
||||
<skipDeploy>true</skipDeploy>
|
||||
<stagingDirectory>${site.staging.base}/target/staging/redback/core/${project.version}</stagingDirectory>
|
||||
<stagingDirectory>${site.staging.base}/target/staging${scmPublishPath}/</stagingDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
<body>
|
||||
<head>
|
||||
<![CDATA[<link rel="stylesheet" href="../css/site.css" type="text/css" />]]>
|
||||
<![CDATA[<link rel="stylesheet" href="/css/site.css" type="text/css" />]]>
|
||||
</head>
|
||||
|
||||
<breadcrumbs>
|
||||
|
|
Loading…
Reference in New Issue