瀏覽代碼

Add capability for a simple deprecation notice, and add one for ubuntu-debootstrap and ubuntu-upstart

Tianon Gravi 9 年之前
父節點
當前提交
002db62a45
共有 3 個文件被更改,包括 10 次插入1 次删除
  1. 1 0
      ubuntu-debootstrap/deprecated.md
  2. 1 0
      ubuntu-upstart/deprecated.md
  3. 8 1
      update.sh

+ 1 - 0
ubuntu-debootstrap/deprecated.md

@@ -0,0 +1 @@
+This image is officially deprecated in favor of [the standard `ubuntu` image](https://hub.docker.com/_/ubuntu/), and will receive no further updates. Please adjust your usage accordingly.

+ 1 - 0
ubuntu-upstart/deprecated.md

@@ -0,0 +1 @@
+This image is officially deprecated (especially now that Upstart is no longer the default init system for Ubuntu) and will receive no further updates. Please adjust your usage accordingly.

+ 8 - 1
update.sh

@@ -132,7 +132,14 @@ for repo in "${repos[@]}"; do
 			composeYml=$'```yaml\n'"$(cat "$repo/docker-compose.yml")"$'\n```'
 		fi
 		
-		cp -v "$helperDir/template.md" "$repo/README.md"
+		deprecated=
+		if [ -f "$repo/deprecated.md" ]; then
+			deprecated=$'# **DEPRECATED**\n\n'
+			deprecated+="$(cat "$repo/deprecated.md")"
+			deprecated+=$'\n\n'
+		fi
+		
+		{ echo -n "$deprecated"; cat "$helperDir/template.md"; } > "$repo/README.md"
 		
 		echo '  TAGS => generate-dockerfile-links-partial.sh'
 		partial="$("$helperDir/generate-dockerfile-links-partial.sh" "$repo")"