This is an automated email from the ASF dual-hosted git repository.
martin_s pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/archiva-redback-core.git
The following commit(s) were added to refs/heads/master by this push:
new 011aed5 Using help plugin for config retrieval
011aed5 is described below
commit 011aed509eb454dd02243acb37fca0d132f44f15
Author: Martin Stockhammer <[email protected]>
AuthorDate: Sun Dec 1 00:04:09 2019 +0100
Using help plugin for config retrieval
---
deploySite.sh | 20 +++++---------------
pom.xml | 3 ++-
src/site/site.xml | 2 +-
3 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/deploySite.sh b/deploySite.sh
index cac4175..3b714af 100755
--- a/deploySite.sh
+++ b/deploySite.sh
@@ -26,24 +26,14 @@
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
fi
@@ -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)? "
diff --git a/pom.xml b/pom.xml
index a30121e..a6849a1 100644
--- a/pom.xml
+++ b/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>
diff --git a/src/site/site.xml b/src/site/site.xml
index 586b17c..b7bb528 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -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>