You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2022/03/22 16:40:16 UTC
[sling-whiteboard] branch master updated: Add script version
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
The following commit(s) were added to refs/heads/master by this push:
new 5673900 Add script version
5673900 is described below
commit 5673900f1b95fe862fd893d833b509f88a6523f5
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Mar 22 17:40:08 2022 +0100
Add script version
---
jbang/SlingStarter.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/jbang/SlingStarter.java b/jbang/SlingStarter.java
index 9d62cef..331c52e 100644
--- a/jbang/SlingStarter.java
+++ b/jbang/SlingStarter.java
@@ -52,20 +52,24 @@ import org.apache.sling.feature.launcher.impl.Main;
*/
class SlingStarter {
+ public static final String SCRIPT_VERSION = "0.1";
+
public static void main(String[] args) {
/* For now only Starter 12 is distributed with this
* format, so there's no point in using this method's
* args to switch versions. Later, maybe.
*/
- final int version = 12;
+ final int slingVersion = 12;
final String farURL = String.format(
"https://repo1.maven.org/maven2/org/apache/sling/org.apache.sling.starter/%d/org.apache.sling.starter-%d-oak_tar_far.far",
- version,
- version
+ slingVersion,
+ slingVersion
);
- System.err.println(String.format("Starting Apache Sling %d using the Feature Launcher", version));
+ System.err.println(String.format("%s V%s : starting Apache Sling %d using the Feature Launcher",
+ SlingStarter.class.getSimpleName(), SCRIPT_VERSION, slingVersion
+ ));
System.err.println("The first run of this script is slower, as it downloads the Sling starter feature file and dependencies");
System.err.println("Starter feature file: " + farURL);
System.err.println("TODO: need to handle arguments such as Sling server port number etc.");