From c4bd60a1ff8c6e7c4e31353be2ac402a60abb458 Mon Sep 17 00:00:00 2001 From: Jakob Jensen Date: Tue, 2 Jul 2024 21:06:34 +0200 Subject: [PATCH] Add deprecation notes (#40) --- .github/workflows/unit-tests.yaml | 4 ++-- lane | 1 + lane.d/google-api-docs-sheets-download/help.md | 2 ++ lane.d/google-api-jwt-generate/help.md | 4 +++- lane.d/google-api-jwt-generate/options.md | 1 - lane.d/google-api-jwt-generate/run.sh | 1 + lane.d/help.md | 2 ++ lane.d/mobile-static-resources-images/help.md | 2 ++ lane.d/mobile-static-resources-images/run.sh | 1 + lane.d/mobile-update-translations/help.md | 2 ++ lane.d/shell-github-action-semver-compare/help.md | 2 ++ lane.d/shell-github-action-semver-compare/run.sh | 1 + lane.d/shell-run-github-workflow-tests/run.sh | 1 + lanes/test | 2 +- 14 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 7bacda5..085aa15 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -18,7 +18,7 @@ jobs: set +e sh ./lane 2> result [ $? -eq 1 ] || exit 1 - echo 'The available lanes are:' > expected + printf 'Warning: lane is deprecated, see help for details\nThe available lanes are:\n' > expected diff -q expected result || { echo "Unexpected difference:"; diff expected result; exit 1; } - name: Test help argument @@ -128,7 +128,7 @@ jobs: set +e sh ./lane 2> result [ $? -eq 1 ] || exit 1 - printf 'The available lanes are:\n say\n touch\n' > expected + printf 'Warning: lane is deprecated, see help for details\nThe available lanes are:\n say\n touch\n' > expected diff -q expected result || { echo "Unexpected difference:"; diff expected result; exit 1; } lane-d-requirements: diff --git a/lane b/lane index e5f686f..93c7685 100755 --- a/lane +++ b/lane @@ -3,6 +3,7 @@ OLD_PWD=$(pwd) LANED_PWD=$(realpath "${0}.d") +echo 'Warning: lane is deprecated, see help for details' >&2 trap 'set +x; cd "$OLD_PWD" >/dev/null 2>&1;' 0 trap 'exit 2' 1 2 3 15 diff --git a/lane.d/google-api-docs-sheets-download/help.md b/lane.d/google-api-docs-sheets-download/help.md index 5ef07d1..d18b280 100644 --- a/lane.d/google-api-docs-sheets-download/help.md +++ b/lane.d/google-api-docs-sheets-download/help.md @@ -12,6 +12,8 @@ SYNOPSIS DESCRIPTION ``` + DEPRECATED - in version 1.0.0 this action is available as 'lane translations download [OPTIONS]', but will require a JSON type service account key. + Downloads a Sheet from Google Docs. ``` diff --git a/lane.d/google-api-jwt-generate/help.md b/lane.d/google-api-jwt-generate/help.md index 4526726..a054814 100644 --- a/lane.d/google-api-jwt-generate/help.md +++ b/lane.d/google-api-jwt-generate/help.md @@ -12,6 +12,8 @@ SYNOPSIS DESCRIPTION ``` + DEPRECATED - this functionality will be built into 'lane translations download [OPTIONS]' in version 1.0.0. + Constructs JWT generation request for Google APIs and outputs a JWT. The purpose is to faciliate token generation for other usages of the Google APIs. @@ -38,4 +40,4 @@ Authentication happens using a specially created .p12 file issued by Google whic You get this .p12 key by creating a "Service Account Key", which if you do not have a service account, requires you to first create a service account. -Creating both an account and a key is explaining here: https://developers.google.com/identity/protocols/oauth2/service-account#creatinganaccount +Creating both an account and a key is explained here: https://developers.google.com/identity/protocols/oauth2/service-account#creatinganaccount diff --git a/lane.d/google-api-jwt-generate/options.md b/lane.d/google-api-jwt-generate/options.md index 3536e5f..671ff46 100644 --- a/lane.d/google-api-jwt-generate/options.md +++ b/lane.d/google-api-jwt-generate/options.md @@ -12,4 +12,3 @@ OPTIONS -p A path to the .p12 file issued by Google. See authentication section in the full help. ``` - diff --git a/lane.d/google-api-jwt-generate/run.sh b/lane.d/google-api-jwt-generate/run.sh index 5f31552..083f884 100644 --- a/lane.d/google-api-jwt-generate/run.sh +++ b/lane.d/google-api-jwt-generate/run.sh @@ -28,6 +28,7 @@ if [ ! -f "$p12" ]; then exit 4 fi +echo 'Warning: this action is deprecated, see help for details' >&2 DIR=$(mktemp -dq) trap 'set +x; rm -fr $DIR >/dev/null 2>&1' 0 diff --git a/lane.d/help.md b/lane.d/help.md index f714ea2..63f34ff 100644 --- a/lane.d/help.md +++ b/lane.d/help.md @@ -12,6 +12,8 @@ SYNOPSIS DESCRIPTION ``` + DEPRECATED - the functionality of basically executing a script can be provided by an actual script, make, ant and similiar tools. Use them instead. + `lane` is a task automation helper. You can organize tasks in lanes. A task is written as a shell script. diff --git a/lane.d/mobile-static-resources-images/help.md b/lane.d/mobile-static-resources-images/help.md index 8735983..7d438ca 100644 --- a/lane.d/mobile-static-resources-images/help.md +++ b/lane.d/mobile-static-resources-images/help.md @@ -12,6 +12,8 @@ SYNOPSIS DESCRIPTION ``` + DEPRECATED - this functionality is now built into Xcode 15 and newer. See https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Asset-Catalogs + Searches an assets directory for .imagesets and generates swift code. The purpose is to enable compilation checks for image references to embedded assets. diff --git a/lane.d/mobile-static-resources-images/run.sh b/lane.d/mobile-static-resources-images/run.sh index 1862996..91fe43d 100755 --- a/lane.d/mobile-static-resources-images/run.sh +++ b/lane.d/mobile-static-resources-images/run.sh @@ -24,6 +24,7 @@ fi parent=$(dirname "$output") mkdir -p "$parent" 2>/dev/null +echo 'Warning: this action is deprecated, see help for details' >&2 { echo '// swiftlint:disable all' echo 'import UIKit' diff --git a/lane.d/mobile-update-translations/help.md b/lane.d/mobile-update-translations/help.md index 6c9bb69..4cad4de 100644 --- a/lane.d/mobile-update-translations/help.md +++ b/lane.d/mobile-update-translations/help.md @@ -13,6 +13,8 @@ SYNOPSIS DESCRIPTION ``` + DEPRECATED - in version 1.0.0 this action is available as 'lane translations generate [OPTIONS]' + Reads a CSV file and uses configuration strings to generate static resource files for android or ios. Each translated string can have '%'-style placeholders, however the number of placeholder for each translated language must be the same. diff --git a/lane.d/shell-github-action-semver-compare/help.md b/lane.d/shell-github-action-semver-compare/help.md index 9af9754..945e1a3 100644 --- a/lane.d/shell-github-action-semver-compare/help.md +++ b/lane.d/shell-github-action-semver-compare/help.md @@ -12,6 +12,8 @@ SYNOPSIS DESCRIPTION ``` + DEPRECATED - this action basically wraps a few lines of shell commands with almost no complexity. Use them directly. + Compares two semver-style versions. The exit code will indicate if the current version is considered higher than the main version. The output includes a GitHub-Action-style group text for easier debugging, and an error message when exit code > 0. diff --git a/lane.d/shell-github-action-semver-compare/run.sh b/lane.d/shell-github-action-semver-compare/run.sh index 8027ee7..0538da3 100755 --- a/lane.d/shell-github-action-semver-compare/run.sh +++ b/lane.d/shell-github-action-semver-compare/run.sh @@ -29,6 +29,7 @@ fi exit 10 } +echo 'Warning: this action is deprecated, see help for details' >&2 verify=$(printf '%s\n%s' "$main" "$current" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -k 4,4 -k 5,5 -g | tail -n1) [ "$main" = "$verify" ] && { echo 'Version must be greater than version on main.' diff --git a/lane.d/shell-run-github-workflow-tests/run.sh b/lane.d/shell-run-github-workflow-tests/run.sh index 220d437..2f314a0 100755 --- a/lane.d/shell-run-github-workflow-tests/run.sh +++ b/lane.d/shell-run-github-workflow-tests/run.sh @@ -28,6 +28,7 @@ if [ ! -f "$file" ]; then exit 111 fi +echo 'Warning: this action is deprecated, see help for details' >&2 DIR=$(mktemp -dq) trap 'set +x; rm -fr $DIR >/dev/null 2>&1' 0 diff --git a/lanes/test b/lanes/test index 27f6809..8c46da2 100644 --- a/lanes/test +++ b/lanes/test @@ -1,3 +1,3 @@ -lane shell-run-github-workflow-tests -i .github/workflows/tests.yaml +lane shell-run-github-workflow-tests -i .github/workflows/unit-tests.yaml shellcheck lane.d/*/run.sh lane shellcheck --exclude=SC2148,SC2034,SC2206,SC2296 lane.d/*.dotrc