[java-identity-provider] branch main updated: IDP-2296 Put a "hands off" warning into dist

Rod Widdowson rdw at steadingsoftware.com
Wed Jul 10 16:20:04 UTC 2024


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=7c6c5effc0e3decec39da4eddbbf80dc7bccca0d

The following commit(s) were added to refs/heads/main by this push:
     new 7c6c5effc IDP-2296 Put a "hands off" warning into dist
7c6c5effc is described below

commit 7c6c5effc0e3decec39da4eddbbf80dc7bccca0d
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Jul 10 17:18:03 2024 +0100

    IDP-2296 Put a "hands off" warning into dist
    
    https://shibboleth.atlassian.net/issues/IDP-2296
    
    Message says:
    
                    WARNING
    
    Content of this folder is controlled by the install programs
    If you add, delete or modify any file inside this directory
    or subdirectories you will  find that things stop working
    at some future date
---
 .../net/shibboleth/idp/installer/impl/CopyDistribution.java | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
index 698fee1e6..829863b4a 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
@@ -14,6 +14,10 @@
 
 package net.shibboleth.idp.installer.impl;
 
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
 import java.nio.file.Files;
 import java.nio.file.Path;
 
@@ -128,6 +132,15 @@ public final class CopyDistribution {
         final Path dist = installerProps.getTargetDir().resolve("dist");
         assert dist!=null;
         InstallerSupport.createDirectory(dist);
+        final File donottouch = dist.resolve("DONOTTOUCH").toFile();
+        try (final Writer w = new FileWriter(donottouch)) {
+            w.write("\t\tWARNING\n\nContent of this folder is controlled by the install programs\n"
+                  + "If you add, delete or modify any file inside this directory\n"
+                  + "or its subdirectories you will find that things stop working\n"
+                  + "at some future date.\n");
+		} catch (final IOException e) {
+            log.error("Could not write {}, continuing", donottouch, e);
+		}
         final Path src = installerProps.getSourceDir();
         if (!Files.exists(src)) {
             log.error("Source distribution {} not found.", src);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list