Skip to content

Commit cb303d2

Browse files
ci(site) Fix version while generating docs + fix version urls
1 parent 636386f commit cb303d2

File tree

11 files changed

+63
-55
lines changed

11 files changed

+63
-55
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
-DskipTests=true
8484
-Dmaven.javadoc.skip=true
8585
-Dreadme.skip=false
86-
-DdocOghamVersion=${{ github.event.inputs.release-version}}
86+
-Ddoc.ogham.version=${{ github.event.inputs.release-version}}
8787
-Dgit.branch=v${{ github.event.inputs.release-version}}
8888
- name: "Build to ensure that it works fine"
8989
run:
@@ -181,7 +181,7 @@ jobs:
181181
-DskipTests=true
182182
-Dmaven.javadoc.skip=true
183183
-Dreadme.skip=false
184-
-DdocOghamVersion=${{ github.event.inputs.next-dev-version }}
184+
-Ddoc.ogham.version=${{ github.event.inputs.next-dev-version }}
185185
-Dgit.branch=master
186186
- name: "Commit next development iteration"
187187
run: |
@@ -236,7 +236,7 @@ jobs:
236236
-DskipTests=true
237237
-Dmaven.javadoc.skip=true
238238
-Dreadme.skip=false
239-
-DdocOghamVersion=${{ github.event.inputs.fix-version }}
239+
-Ddoc.ogham.version=${{ github.event.inputs.fix-version }}
240240
-Dgit.branch=$FIX_BRANCH
241241
- name: "Create fix branch or update it"
242242
run: |

.github/workflows/update-readme.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,16 @@ jobs:
2929
- name: "Get latest release"
3030
id: latest-release
3131
run: |
32-
LATEST_RELEASE=$(git tag -l | sort -Vr | head -n1)
32+
LATEST_RELEASE="$(git tag -l | sort -Vr | head -n1)"
33+
LATEST_RELEASE="${LATEST_RELEASE#v}"
3334
echo "::set-output name=version::$LATEST_RELEASE"
3435
- name: "Generate README.adoc"
3536
run:
3637
./mvnw install
3738
-DskipTests=true
3839
-Dmaven.javadoc.skip=true
3940
-Dreadme.skip=false
40-
-DdocOghamVersion=${{ steps.latest-release.outputs.version}}
41+
-Ddoc.ogham.version=${{ steps.latest-release.outputs.version}}
4142
-Dgit.branch=master
4243
- name: "Has changed"
4344
id: has-changed

.github/workflows/update-site.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
run: |
9696
export JAVA_TOOL_OPTIONS='-Xmx4096m'
9797
export MAVEN_OPTS='-Xmx4096m'
98-
ci/./generate-documentation.sh
98+
ci/./generate-documentation.sh '-Ddoc.ogham.version=${{ github.event.inputs.current-version }}' '-Dgit.branch=${{ github.event.inputs.git-branch }}'
9999
- name: "Generate showcase video"
100100
uses: nick-invision/retry@v2
101101
with:
@@ -144,7 +144,7 @@ jobs:
144144
./mvnw site:stage
145145
'-Pmutation-testing'
146146
'-Dsite.staging.dir=gh-pages'
147-
'-DdocOghamVersion=${{ github.event.inputs.current-version }}'
147+
'-Ddoc.ogham.version=${{ github.event.inputs.current-version }}'
148148
'-Dgit.branch=${{ github.event.inputs.git-branch }}'
149149
- uses: actions/setup-python@v2
150150
with:

DEV.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The new folder `ogham-site` in the example will be the folder where generated do
134134
----
135135
./mvnw clean site post-site site:stage \
136136
-Dsite.staging.dir=<path to ogham-site> \
137-
-DdocOghamVersion=<ogham version> \
137+
-Ddoc.ogham.version=<ogham version> \
138138
-Dgit.branch=v<ogham version>
139139
----
140140

README.adoc

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ image:https://sonarcloud.io/api/project_badges/measure?project=fr.sii.ogham%3Aog
3232

3333
--
3434

35-
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]
35+
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]
3636

3737
'''
3838

@@ -46,19 +46,19 @@ image::https://groupe-sii.github.io/ogham/vv3.0.0/presentation/showcase.png[Show
4646
[cols=3, %autowidth.stretch]
4747
|===
4848
| 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"]
49-
| 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"]
49+
| 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"]
5050
| 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"]
5151

5252
| https://groupe-sii.github.io/ogham/redirects/latest-release-site.html[site]
53-
| https://groupe-sii.github.io/ogham/vv3.0.0[site]
53+
| https://groupe-sii.github.io/ogham/v3.0.0[site]
5454
| https://groupe-sii.github.io/ogham/redirects/nightly-build-site.html[site]
5555

5656
| https://groupe-sii.github.io/ogham/redirects/latest-release-code.html[code]
5757
| https://github.com/groupe-sii/ogham/tree/master[code]
5858
| https://github.com/groupe-sii/ogham/tree/master[code]
5959

6060
| https://groupe-sii.github.io/ogham/redirects/latest-release-showcase.html[showcase]
61-
| https://groupe-sii.github.io/ogham/vv3.0.0/presentation/showcase.html[showcase]
61+
| https://groupe-sii.github.io/ogham/v3.0.0/presentation/showcase.html[showcase]
6262
| https://groupe-sii.github.io/ogham/redirects/nightly-build-showcase.html[showcase]
6363
|===
6464

@@ -117,7 +117,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
117117
<dependency>
118118
<groupId>fr.sii.ogham</groupId>
119119
<artifactId>ogham-all</artifactId>
120-
<version>v3.0.0</version>
120+
<version>3.0.0</version>
121121
</dependency>
122122
...
123123
----
@@ -135,7 +135,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig
135135
----
136136
...
137137
dependencies {
138-
implementation 'fr.sii.ogham:ogham-all:v3.0.0'
138+
implementation 'fr.sii.ogham:ogham-all:3.0.0'
139139
}
140140
----
141141
@@ -185,7 +185,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
185185
<dependency>
186186
<groupId>fr.sii.ogham</groupId>
187187
<artifactId>ogham-spring-boot-starter-all</artifactId>
188-
<version>v3.0.0</version>
188+
<version>3.0.0</version>
189189
</dependency>
190190
191191
...
@@ -203,7 +203,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig
203203
...
204204
205205
dependencies {
206-
implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:v3.0.0'
206+
implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:3.0.0'
207207
...
208208
}
209209
----
@@ -243,7 +243,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
243243
<dependency>
244244
<groupId>fr.sii.ogham</groupId>
245245
<artifactId>ogham-spring-boot-starter-all</artifactId> <!--1-->
246-
<version>v3.0.0</version>
246+
<version>3.0.0</version>
247247
</dependency>
248248
249249
<dependency>
@@ -280,7 +280,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig
280280
...
281281
282282
dependencies {
283-
implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:v3.0.0' // <1>
283+
implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:3.0.0' // <1>
284284
285285
implementation 'org.springframework.boot:spring-boot-starter-freemarker' // <2>
286286
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' // <3>
@@ -356,15 +356,15 @@ is easy but may import dependencies that you
356356
don't need. For example, you may only need FreeMarker but not Thymeleaf. Or
357357
you may only need to send emails through SMTP but never use SendGrid.
358358

359-
See how to https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#select-features-standalone[select features].
359+
See how to https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#select-features-standalone[select features].
360360

361361

362362
== Usage
363363

364364
[NOTE]
365365
====
366366
All samples with templates are using ThymeLeaf as template engine. For FreeMarker samples,
367-
take a look at https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#freemarker[FreeMarker section].
367+
take a look at https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#freemarker[FreeMarker section].
368368
====
369369

370370
=== Send Email
@@ -374,7 +374,7 @@ take a look at https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#freem
374374
The samples are available in the https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage[sample-standard-usage sub-project].
375375
376376
All samples shown bellow are using SMTP for sending email.
377-
See https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#sendgrid[Sending email through SendGrid]
377+
See https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#sendgrid[Sending email through SendGrid]
378378
to know how to send email using SendGrid HTTP API.
379379
====
380380

@@ -453,7 +453,7 @@ _____
453453
454454
The construction of the email is done using a fluent API in order to chain calls and to have a more readable code.
455455
456-
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].
456+
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].
457457
458458
459459
.Email address format
@@ -571,7 +571,7 @@ The `template` method requires two pieces of information:
571571
The path to the template is a string that may contain a *lookup* prefix. The lookup prefix is used to indicate
572572
where to search the template (from file system, from classpath or anywhere else). Here we explicitly
573573
ask to load the template from classpath (using prefix `classpath:`). If no lookup is defined,
574-
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.
574+
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.
575575
576576
The variables are any object you are using in your application. No need to convert your object to a
577577
particular format. Directly use what you want.
@@ -1390,7 +1390,7 @@ _____
13901390
13911391
Attaching a file to the email is quite simple. You just need to provide the path to the file.
13921392
The file is loaded from classpath but could also be loaded from file system or anywhere else
1393-
(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,
1393+
(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,
13941394
the name of the attachment displayed in the email is automatically determined (`test.pdf` in the example).
13951395
13961396
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`.
14201420

14211421
==== Other email features
14221422

1423-
See user guide to read about https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#email-usage[the many other features].
1423+
See user guide to read about https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#email-usage[the many other features].
14241424

14251425
=== Send SMS
14261426

@@ -1432,9 +1432,9 @@ All samples shown bellow are using SMPP for sending SMS.
14321432
The https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer[SMPP] protocol
14331433
is the standard way to send SMS. Only a subset of SMPP properties are used
14341434
in following samples. The whole list of SMPP properties is available
1435-
in https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#advanced-smpp-configuration[advanced configuration].
1435+
in https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#advanced-smpp-configuration[advanced configuration].
14361436
1437-
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.
1437+
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.
14381438
====
14391439

14401440
==== First SMS using an existing SMPP server
@@ -1510,7 +1510,7 @@ _____
15101510
The construction of the SMS is done using a fluent API in order to chain calls and to have a more
15111511
readable code.
15121512
1513-
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].
1513+
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].
15141514
==========
15151515

15161516
==== Use a template for SMS content
@@ -1607,7 +1607,7 @@ The `template` method requires two pieces of information:
16071607
The path to the template is a string with a *lookup* prefix. The lookup prefix is used to indicate
16081608
where to search the template (from file system, from classpath or anywhere else). Here we explicitly
16091609
ask to load the template from classpath (using prefix `classpath:`). If no lookup is defined,
1610-
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.
1610+
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.
16111611
16121612
The variables are any object you are using in your application. No need to convert your object to
16131613
a particular format. Directly use what you want.
@@ -1706,7 +1706,7 @@ By default, Ogham sends the SMS using 8-bit encoding.
17061706

17071707
==== Other SMS features
17081708

1709-
Ogham provides https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#sms-usage[many other features].
1709+
Ogham provides https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#sms-usage[many other features].
17101710

17111711

17121712
== Testing
@@ -1732,7 +1732,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
17321732
<dependency>
17331733
<groupId>fr.sii.ogham</groupId>
17341734
<artifactId>ogham-test-utils</artifactId>
1735-
<version>v3.0.0</version>
1735+
<version>3.0.0</version>
17361736
<scope>test</scope>
17371737
</dependency>
17381738
----
@@ -1750,7 +1750,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig
17501750
[source, groovy, subs=attributes+]
17511751
----
17521752
dependencies {
1753-
testImplementation 'fr.sii.ogham:ogham-test-utils:v3.0.0'
1753+
testImplementation 'fr.sii.ogham:ogham-test-utils:3.0.0'
17541754
}
17551755
----
17561756
@@ -1775,7 +1775,7 @@ This will include:
17751775
[TIP]
17761776
====
17771777
You can
1778-
https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#testing-tools-eclipse-static-imports[configure Eclipse]
1778+
https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#testing-tools-eclipse-static-imports[configure Eclipse]
17791779
to provide autocompletion for static imports.
17801780
====
17811781
==========
@@ -1952,29 +1952,29 @@ _____
19521952

19531953
Ogham provides many other tool features:
19541954

1955-
* https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#testing-email[Email assertions and tools].
1956-
* https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#testing-sms[SMS assertions and tools].
1957-
* https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#random-ports[Use random ports to parallelize tests].
1955+
* https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#testing-email[Email assertions and tools].
1956+
* https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#testing-sms[SMS assertions and tools].
1957+
* https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#random-ports[Use random ports to parallelize tests].
19581958

19591959

19601960
== Advanced configuration
19611961

1962-
https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#section-advanced-configuration[See advanced configuration in full documentation]
1962+
https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#section-advanced-configuration[See advanced configuration in full documentation]
19631963

19641964
== Extend
19651965

1966-
https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#section-extend[See how to extend Ogham in full documentation]
1966+
https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#section-extend[See how to extend Ogham in full documentation]
19671967

19681968
== Tips
19691969

1970-
https://groupe-sii.github.io/ogham/vv3.0.0/user-manual.html#section-tips[See tips in full documentation]
1970+
https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#section-tips[See tips in full documentation]
19711971

19721972
== Support developer
19731973

19741974
I am currently the single developer on this project for several years.
19751975
I have many ideas for this project to ease other developer work.
19761976

1977-
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].
1977+
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].
19781978

19791979
image:src/docs/resources/images/donation/paypal-small.png[alt="Donate with PayPal", link="https://www.paypal.com/donate?hosted_button_id=KQKEFU5LE5K2J"]
19801980
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"]

build-tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<skip>${readme.skip}</skip>
4848
<executable>${project.basedir}/.././mvnw</executable>
4949
<workingDirectory>${project.basedir}/../documentation-generator</workingDirectory>
50-
<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>
50+
<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>
5151
</configuration>
5252
</execution>
5353
<!-- TODO: replace by maven plugin when abort-on-exit is supported -->

ci/generate-documentation.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ set -e${DEBUG_COMMANDS:+x}
77
-Dmaven.test.redirectTestOutputToFile=true \
88
-Dsurefire.useSystemClassLoader=false \
99
-Dfailsafe.useSystemClassLoader=false \
10-
-B
10+
-B \
11+
$*
1112

1213
# FIXME: mutation testing produces surefire and failsafe reports => must build, test and generate site again...
1314
./mvnw install post-site \
1415
-Dmaven.test.redirectTestOutputToFile=true \
1516
-Dsurefire.useSystemClassLoader=false \
1617
-Dfailsafe.useSystemClassLoader=false \
17-
-B
18+
-B \
19+
$*

0 commit comments

Comments
 (0)