Skip to content

Commit

Permalink
ci(site) Fix version while generating docs + fix version urls
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelien-baudet committed Jan 25, 2021
1 parent 636386f commit f7001a6
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 55 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ 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:
./mvnw install
-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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion DEV.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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=<path to ogham-site> \
-DdocOghamVersion=<ogham version> \
-Ddoc.ogham.version=<ogham version> \
-Dgit.branch=v<ogham version>
----

Expand Down
64 changes: 32 additions & 32 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]

'''

Expand All @@ -46,19 +46,19 @@ 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]
| https://github.com/groupe-sii/ogham/tree/master[code]
| 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]
|===

Expand Down Expand Up @@ -117,7 +117,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
<dependency>
<groupId>fr.sii.ogham</groupId>
<artifactId>ogham-all</artifactId>
<version>v3.0.0</version>
<version>3.0.0</version>
</dependency>
...
----
Expand All @@ -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'
}
----
Expand Down Expand Up @@ -185,7 +185,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
<dependency>
<groupId>fr.sii.ogham</groupId>
<artifactId>ogham-spring-boot-starter-all</artifactId>
<version>v3.0.0</version>
<version>3.0.0</version>
</dependency>
...
Expand All @@ -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'
...
}
----
Expand Down Expand Up @@ -243,7 +243,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
<dependency>
<groupId>fr.sii.ogham</groupId>
<artifactId>ogham-spring-boot-starter-all</artifactId> <!--1-->
<version>v3.0.0</version>
<version>3.0.0</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -356,15 +356,15 @@ 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

[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
Expand All @@ -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.
====

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -1732,7 +1732,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
<dependency>
<groupId>fr.sii.ogham</groupId>
<artifactId>ogham-test-utils</artifactId>
<version>v3.0.0</version>
<version>3.0.0</version>
<scope>test</scope>
</dependency>
----
Expand All @@ -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'
}
----
Expand All @@ -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.
====
==========
Expand Down Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion build-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<skip>${readme.skip}</skip>
<executable>${project.basedir}/.././mvnw</executable>
<workingDirectory>${project.basedir}/../documentation-generator</workingDirectory>
<commandlineArgs>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"</commandlineArgs>
<commandlineArgs>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"</commandlineArgs>
</configuration>
</execution>
<!-- TODO: replace by maven plugin when abort-on-exit is supported -->
Expand Down
6 changes: 4 additions & 2 deletions ci/generate-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
$*
Loading

0 comments on commit f7001a6

Please sign in to comment.