diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1423dbddb8..704dbca92f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,7 +83,7 @@ jobs: -DskipTests=true -Dmaven.javadoc.skip=true -Dreadme.skip=false - -DdocOghamVersion=${{ github.event.inputs.release-version}} + -Ddoc.ogham.version=${{ github.event.inputs.release-version}} -Dgit.branch=v${{ github.event.inputs.release-version}} - name: "Build to ensure that it works fine" run: @@ -181,7 +181,7 @@ jobs: -DskipTests=true -Dmaven.javadoc.skip=true -Dreadme.skip=false - -DdocOghamVersion=${{ github.event.inputs.next-dev-version }} + -Ddoc.ogham.version=${{ github.event.inputs.next-dev-version }} -Dgit.branch=master - name: "Commit next development iteration" run: | @@ -236,7 +236,7 @@ jobs: -DskipTests=true -Dmaven.javadoc.skip=true -Dreadme.skip=false - -DdocOghamVersion=${{ github.event.inputs.fix-version }} + -Ddoc.ogham.version=${{ github.event.inputs.fix-version }} -Dgit.branch=$FIX_BRANCH - name: "Create fix branch or update it" run: | diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 7badbd2abf..2d08ea5e8b 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -29,7 +29,8 @@ jobs: - name: "Get latest release" id: latest-release run: | - LATEST_RELEASE=$(git tag -l | sort -Vr | head -n1) + LATEST_RELEASE="$(git tag -l | sort -Vr | head -n1)" + LATEST_RELEASE="${LATEST_RELEASE#v}" echo "::set-output name=version::$LATEST_RELEASE" - name: "Generate README.adoc" run: @@ -37,7 +38,7 @@ jobs: -DskipTests=true -Dmaven.javadoc.skip=true -Dreadme.skip=false - -DdocOghamVersion=${{ steps.latest-release.outputs.version}} + -Ddoc.ogham.version=${{ steps.latest-release.outputs.version}} -Dgit.branch=master - name: "Has changed" id: has-changed diff --git a/.github/workflows/update-site.yml b/.github/workflows/update-site.yml index 43424efd60..2b1ac78a41 100644 --- a/.github/workflows/update-site.yml +++ b/.github/workflows/update-site.yml @@ -95,7 +95,7 @@ jobs: run: | export JAVA_TOOL_OPTIONS='-Xmx4096m' export MAVEN_OPTS='-Xmx4096m' - ci/./generate-documentation.sh + ci/./generate-documentation.sh '-Ddoc.ogham.version=${{ github.event.inputs.current-version }}' '-Dgit.branch=${{ github.event.inputs.git-branch }}' - name: "Generate showcase video" uses: nick-invision/retry@v2 with: @@ -144,7 +144,7 @@ jobs: ./mvnw site:stage '-Pmutation-testing' '-Dsite.staging.dir=gh-pages' - '-DdocOghamVersion=${{ github.event.inputs.current-version }}' + '-Ddoc.ogham.version=${{ github.event.inputs.current-version }}' '-Dgit.branch=${{ github.event.inputs.git-branch }}' - uses: actions/setup-python@v2 with: diff --git a/DEV.adoc b/DEV.adoc index f1f1a6bceb..73c3bb9631 100644 --- a/DEV.adoc +++ b/DEV.adoc @@ -134,7 +134,7 @@ The new folder `ogham-site` in the example will be the folder where generated do ---- ./mvnw clean site post-site site:stage \ -Dsite.staging.dir= \ - -DdocOghamVersion= \ + -Ddoc.ogham.version= \ -Dgit.branch=v ---- diff --git a/README.adoc b/README.adoc index 7a45607178..b6f3748983 100644 --- a/README.adoc +++ b/README.adoc @@ -32,7 +32,7 @@ image:https://sonarcloud.io/api/project_badges/measure?project=fr.sii.ogham%3Aog -- -image::https://groupe-sii.github.io/ogham/vv3.0.0/presentation/showcase.png[Showcase, link=https://groupe-sii.github.io/ogham/vv3.0.0/showcase-video.html] +image::https://groupe-sii.github.io/ogham/v3.0.0/presentation/showcase.png[Showcase, link=https://groupe-sii.github.io/ogham/v3.0.0/showcase-video.html] ''' @@ -46,11 +46,11 @@ image::https://groupe-sii.github.io/ogham/vv3.0.0/presentation/showcase.png[Show [cols=3, %autowidth.stretch] |=== | image:https://img.shields.io/endpoint?url=https://groupe-sii.github.io/ogham/badges/latest-release-version.json[Latest Release, link="https://groupe-sii.github.io/ogham/redirects/latest-release-site.html"] -| image:https://img.shields.io/static/v1?label=This%20version&message=vv3.0.0[This version, link="https://groupe-sii.github.io/ogham/vv3.0.0"] +| image:https://img.shields.io/static/v1?label=This%20version&message=v3.0.0[This version, link="https://groupe-sii.github.io/ogham/v3.0.0"] | image:https://img.shields.io/endpoint?url=https://groupe-sii.github.io/ogham/badges/nightly-build-version.json[Nightly build, link="https://groupe-sii.github.io/ogham/redirects/nightly-build-site.html"] | https://groupe-sii.github.io/ogham/redirects/latest-release-site.html[site] -| https://groupe-sii.github.io/ogham/vv3.0.0[site] +| https://groupe-sii.github.io/ogham/v3.0.0[site] | https://groupe-sii.github.io/ogham/redirects/nightly-build-site.html[site] | https://groupe-sii.github.io/ogham/redirects/latest-release-code.html[code] @@ -58,7 +58,7 @@ image::https://groupe-sii.github.io/ogham/vv3.0.0/presentation/showcase.png[Show | https://github.com/groupe-sii/ogham/tree/master[code] | https://groupe-sii.github.io/ogham/redirects/latest-release-showcase.html[showcase] -| https://groupe-sii.github.io/ogham/vv3.0.0/presentation/showcase.html[showcase] +| https://groupe-sii.github.io/ogham/v3.0.0/presentation/showcase.html[showcase] | https://groupe-sii.github.io/ogham/redirects/nightly-build-showcase.html[showcase] |=== @@ -117,7 +117,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30] fr.sii.ogham ogham-all - v3.0.0 + 3.0.0 ... ---- @@ -135,7 +135,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig ---- ... dependencies { - implementation 'fr.sii.ogham:ogham-all:v3.0.0' + implementation 'fr.sii.ogham:ogham-all:3.0.0' } ---- @@ -185,7 +185,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30] fr.sii.ogham ogham-spring-boot-starter-all - v3.0.0 + 3.0.0 ... @@ -203,7 +203,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig ... dependencies { - implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:v3.0.0' + implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:3.0.0' ... } ---- @@ -243,7 +243,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30] fr.sii.ogham ogham-spring-boot-starter-all - v3.0.0 + 3.0.0 @@ -280,7 +280,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig ... dependencies { - implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:v3.0.0' // <1> + implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:3.0.0' // <1> implementation 'org.springframework.boot:spring-boot-starter-freemarker' // <2> implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' // <3> @@ -356,7 +356,7 @@ is easy but may import dependencies that you don't need. For example, you may only need FreeMarker but not Thymeleaf. Or you may only need to send emails through SMTP but never use SendGrid. -See how to https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#select-features-standalone[select features]. +See how to https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#select-features-standalone[select features]. == Usage @@ -364,7 +364,7 @@ See how to https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#select-fe [NOTE] ==== All samples with templates are using ThymeLeaf as template engine. For FreeMarker samples, -take a look at https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#freemarker[FreeMarker section]. +take a look at https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#freemarker[FreeMarker section]. ==== === Send Email @@ -374,7 +374,7 @@ take a look at https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#freem The samples are available in the https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage[sample-standard-usage sub-project]. All samples shown bellow are using SMTP for sending email. -See https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#sendgrid[Sending email through SendGrid] +See https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#sendgrid[Sending email through SendGrid] to know how to send email using SendGrid HTTP API. ==== @@ -453,7 +453,7 @@ _____ The construction of the email is done using a fluent API in order to chain calls and to have a more readable code. -Properties are directly provided in the code. You can instead https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#properties-handling[use a configuration file]. +Properties are directly provided in the code. You can instead https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#properties-handling[use a configuration file]. .Email address format @@ -571,7 +571,7 @@ The `template` method requires two pieces of information: The path to the template is a string that may contain a *lookup* prefix. The lookup prefix is used to indicate where to search the template (from file system, from classpath or anywhere else). Here we explicitly ask to load the template from classpath (using prefix `classpath:`). If no lookup is defined, -classpath is used by default. See https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#resource-resolution[Resource resolution section] for more information. +classpath is used by default. See https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#resource-resolution[Resource resolution section] for more information. The variables are any object you are using in your application. No need to convert your object to a particular format. Directly use what you want. @@ -1390,7 +1390,7 @@ _____ Attaching a file to the email is quite simple. You just need to provide the path to the file. The file is loaded from classpath but could also be loaded from file system or anywhere else -(see https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#resource-resolution[ resource resolution section]). In case you are using a file, +(see https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#resource-resolution[ resource resolution section]). In case you are using a file, the name of the attachment displayed in the email is automatically determined (`test.pdf` in the example). It is often not possible to handle files directly. In that case you will use `InputStream` or @@ -1420,7 +1420,7 @@ disposition is automatically set to `ContentDisposition.INLINE`. ==== Other email features -See user guide to read about https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#email-usage[the many other features]. +See user guide to read about https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#email-usage[the many other features]. === Send SMS @@ -1432,9 +1432,9 @@ All samples shown bellow are using SMPP for sending SMS. The https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer[SMPP] protocol is the standard way to send SMS. Only a subset of SMPP properties are used in following samples. The whole list of SMPP properties is available -in https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#advanced-smpp-configuration[advanced configuration]. +in https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#advanced-smpp-configuration[advanced configuration]. -See https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#ovh[Sending SMS through OVH] to know how to send SMS using OVH HTTP API. +See https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#ovh[Sending SMS through OVH] to know how to send SMS using OVH HTTP API. ==== ==== First SMS using an existing SMPP server @@ -1510,7 +1510,7 @@ _____ The construction of the SMS is done using a fluent API in order to chain calls and to have a more readable code. -Properties are directly provided in the code. You can instead https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#properties-handling[use a configuration file]. +Properties are directly provided in the code. You can instead https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#properties-handling[use a configuration file]. ========== ==== Use a template for SMS content @@ -1607,7 +1607,7 @@ The `template` method requires two pieces of information: The path to the template is a string with a *lookup* prefix. The lookup prefix is used to indicate where to search the template (from file system, from classpath or anywhere else). Here we explicitly ask to load the template from classpath (using prefix `classpath:`). If no lookup is defined, -classpath is used by default. See https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#resource-resolution[Resource resolution section] for more information. +classpath is used by default. See https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#resource-resolution[Resource resolution section] for more information. The variables are any object you are using in your application. No need to convert your object to a particular format. Directly use what you want. @@ -1706,7 +1706,7 @@ By default, Ogham sends the SMS using 8-bit encoding. ==== Other SMS features -Ogham provides https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#sms-usage[many other features]. +Ogham provides https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#sms-usage[many other features]. == Testing @@ -1732,7 +1732,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30] fr.sii.ogham ogham-test-utils - v3.0.0 + 3.0.0 test ---- @@ -1750,7 +1750,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig [source, groovy, subs=attributes+] ---- dependencies { - testImplementation 'fr.sii.ogham:ogham-test-utils:v3.0.0' + testImplementation 'fr.sii.ogham:ogham-test-utils:3.0.0' } ---- @@ -1775,7 +1775,7 @@ This will include: [TIP] ==== You can -https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#testing-tools-eclipse-static-imports[configure Eclipse] +https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#testing-tools-eclipse-static-imports[configure Eclipse] to provide autocompletion for static imports. ==== ========== @@ -1952,29 +1952,29 @@ _____ Ogham provides many other tool features: -* https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#testing-email[Email assertions and tools]. -* https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#testing-sms[SMS assertions and tools]. -* https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#random-ports[Use random ports to parallelize tests]. +* https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#testing-email[Email assertions and tools]. +* https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#testing-sms[SMS assertions and tools]. +* https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#random-ports[Use random ports to parallelize tests]. == Advanced configuration -https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#section-advanced-configuration[See advanced configuration in full documentation] +https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#section-advanced-configuration[See advanced configuration in full documentation] == Extend -https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#section-extend[See how to extend Ogham in full documentation] +https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#section-extend[See how to extend Ogham in full documentation] == Tips -https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#section-tips[See tips in full documentation] +https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#section-tips[See tips in full documentation] == Support developer I am currently the single developer on this project for several years. I have many ideas for this project to ease other developer work. -You can help me by either https://groupe-sii.github.io/ogham/vv3.0.0/contribute.html[contributing] or by https://groupe-sii.github.io/ogham/vv3.0.0/donate.html[making a donation]. +You can help me by either https://groupe-sii.github.io/ogham/v3.0.0/contribute.html[contributing] or by https://groupe-sii.github.io/ogham/v3.0.0/donate.html[making a donation]. image:src/docs/resources/images/donation/paypal-small.png[alt="Donate with PayPal", link="https://www.paypal.com/donate?hosted_button_id=KQKEFU5LE5K2J"] image:src/docs/resources/images/donation/coinbase-small.png[alt="Donate crypto (Bitcoin, Ethereum, ...)", link="https://commerce.coinbase.com/checkout/7c322363-b8ef-4624-8957-a750b631f859"] diff --git a/build-tools/pom.xml b/build-tools/pom.xml index 8c88d8e127..0c31963a51 100644 --- a/build-tools/pom.xml +++ b/build-tools/pom.xml @@ -47,7 +47,7 @@ ${readme.skip} ${project.basedir}/.././mvnw ${project.basedir}/../documentation-generator - spring-boot:run -Dspring-boot.run.arguments="--generator.doc.source.root-directory=${project.basedir}/../ --generator.github.current-branch=${git.branch} --generator.ogham.current-version=${docOghamVersion} --readme" + spring-boot:run -Dspring-boot.run.arguments="--generator.doc.source.root-directory=${project.basedir}/../ --generator.github.current-branch=${git.branch} --generator.ogham.current-version=${doc.ogham.version} --readme" diff --git a/ci/generate-documentation.sh b/ci/generate-documentation.sh index aac2cb0703..a63e1da0c8 100755 --- a/ci/generate-documentation.sh +++ b/ci/generate-documentation.sh @@ -7,11 +7,13 @@ set -e${DEBUG_COMMANDS:+x} -Dmaven.test.redirectTestOutputToFile=true \ -Dsurefire.useSystemClassLoader=false \ -Dfailsafe.useSystemClassLoader=false \ - -B + -B \ + $* # FIXME: mutation testing produces surefire and failsafe reports => must build, test and generate site again... ./mvnw install post-site \ -Dmaven.test.redirectTestOutputToFile=true \ -Dsurefire.useSystemClassLoader=false \ -Dfailsafe.useSystemClassLoader=false \ - -B + -B \ + $* diff --git a/pom.xml b/pom.xml index 2dfe8806d3..44898a337a 100644 --- a/pom.xml +++ b/pom.xml @@ -128,10 +128,14 @@ gitsite:git@github.com/groupe-sii/ogham.git - ${project.version} + ${project.version} + ${doc.ogham.version} false ${project.build.directory}/staging - v${docOghamVersion} + v${doc.ogham.version} ${site.staging.dir}/${site.output.version-dir} ${site.output.dir}/presentation cerulean @@ -1158,7 +1162,7 @@ true 2 - ${docOghamVersion} + ${doc.ogham.version} ${basedir}/src/docs/asciidoc ${basedir}/src/docs/resources/templates ${github.code.url} @@ -1319,7 +1323,7 @@ true 2 - ${docOghamVersion} + ${doc.ogham.version} ${basedir}/src/docs/asciidoc ${basedir}/src/docs/resources/templates ${github.code.url} @@ -1827,7 +1831,7 @@ release - ${releaseVersion} + ${releaseVersion} v${releaseVersion} false false diff --git a/src/docs/asciidoc/general/releases/v3.0.0.adoc b/src/docs/asciidoc/general/releases/v3.0.0.adoc index e5fdb4ef16..f60b73b307 100644 --- a/src/docs/asciidoc/general/releases/v3.0.0.adoc +++ b/src/docs/asciidoc/general/releases/v3.0.0.adoc @@ -17,21 +17,28 @@ See detailed migration guide to <'); $('.dropdown-menu', ul).empty(); $.get($(".navbar-brand").attr("href") + "/versions.json", function(data) { data.forEach(function(version) { - $('.dropdown-menu', ul).append('
  • '+version+'
  • '); + $('.dropdown-menu', ul).append('
  • '+version+'
  • '); }); }); } diff --git a/src/site/site.xml b/src/site/site.xml index 879e1043f2..34378684c4 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -7,7 +7,7 @@ Ogham https://groupe-sii.github.io/ogham - + @@ -172,7 +172,8 @@ href="${this.github.code.url}/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlAndTextMixedTemplateEnginesSample.java?ts=4" /> - + +