From 002db62a459d1a9cf2bf8666e0caf806e0831637 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 18 Jan 2016 08:54:41 -0800 Subject: [PATCH] Add capability for a simple deprecation notice, and add one for ubuntu-debootstrap and ubuntu-upstart --- ubuntu-debootstrap/deprecated.md | 1 + ubuntu-upstart/deprecated.md | 1 + update.sh | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 ubuntu-debootstrap/deprecated.md create mode 100644 ubuntu-upstart/deprecated.md diff --git a/ubuntu-debootstrap/deprecated.md b/ubuntu-debootstrap/deprecated.md new file mode 100644 index 000000000..b0ae8b0da --- /dev/null +++ b/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. diff --git a/ubuntu-upstart/deprecated.md b/ubuntu-upstart/deprecated.md new file mode 100644 index 000000000..1b53904cc --- /dev/null +++ b/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. diff --git a/update.sh b/update.sh index c92d05821..d116f7265 100755 --- a/update.sh +++ b/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")"