From d6e088642a1b31a1e6df182294bbe6e2155304f5 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:55:23 -0800 Subject: [PATCH] remove v4 --- .github/workflows/make-go-tag.yaml | 21 ------------- .github/workflows/make-latest-tag.yaml | 23 -------------- CHANGELOG.md | 6 ++++ Makefile | 20 ------------ README.md | 20 ++++-------- action.yaml | 6 ++-- darwin/action.yaml | 2 +- darwin/install-senzing.sh | 20 ++++++------ docs/README.md | 4 +-- docs/development.md | 2 +- docs/errors.md | 2 +- docs/examples.md | 2 +- linux/action.yaml | 4 +-- linux/install-senzing.sh | 43 ++++++++++---------------- windows/action.yaml | 2 +- windows/install-senzing.sh | 17 +++++----- 16 files changed, 60 insertions(+), 134 deletions(-) delete mode 100644 .github/workflows/make-go-tag.yaml delete mode 100644 .github/workflows/make-latest-tag.yaml delete mode 100755 Makefile diff --git a/.github/workflows/make-go-tag.yaml b/.github/workflows/make-go-tag.yaml deleted file mode 100644 index 5a25899..0000000 --- a/.github/workflows/make-go-tag.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: make go tag - -on: - push: - tags: - - "[0-9]+.[0-9]+.[0-9]+" - -permissions: - contents: write - -jobs: - make-go-tag: - name: make a vM.m.P tag - runs-on: ubuntu-latest - - steps: - - name: checkout repository - uses: actions/checkout@v4 - - - name: make go version tag - uses: senzing-factory/github-action-make-go-tag@v1 diff --git a/.github/workflows/make-latest-tag.yaml b/.github/workflows/make-latest-tag.yaml deleted file mode 100644 index 5b73904..0000000 --- a/.github/workflows/make-latest-tag.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: make latest tag - -on: - push: - tags: - - "[0-9]+.[0-9]+.[0-9]+" - -permissions: - contents: write - -jobs: - make-go-tag: - name: make a vM.m.P tag - runs-on: ubuntu-latest - - steps: - - name: checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: run latest-tag - uses: EndBug/latest-tag@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ba06d3..73bb80d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning]. - +## [5.0.0] - 2024-11-12 + +### Changed in 5.0.0 + +- Restrict this action to Senzing API installs V3 and lower. + ## [3.0.2] - 2024-08-20 ### Changed in 3.0.2 diff --git a/Makefile b/Makefile deleted file mode 100755 index 7401b17..0000000 --- a/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Git variables - -GIT_REPOSITORY_NAME := $(shell basename `git rev-parse --show-toplevel`) -GIT_VERSION := $(shell git describe --always --tags --long --dirty | sed -e 's/\-0//' -e 's/\-g.......//') - -# ----------------------------------------------------------------------------- -# The first "make" target runs as default. -# ----------------------------------------------------------------------------- - -.PHONY: default -default: help - -# ----------------------------------------------------------------------------- -# Help -# ----------------------------------------------------------------------------- - -.PHONY: help -help: - @echo "List of make targets:" - @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs diff --git a/README.md b/README.md index f3ac849..0d1f9ab 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,12 @@ ## Synopsis -A GitHub Action for installing the Senzing API. +A GitHub Action for installing the Senzing API **_V3 or lower_**. ## Overview -The GitHub Action performs a -[system install] -of the Senzing API. -The GitHub Action works where the -[RUNNER_OS] +The GitHub Action performs a [system install] of the Senzing API. +The GitHub Action works where the [RUNNER_OS] GitHub variable is `Linux`, `macOS`, or `Windows`. ## Usage @@ -28,7 +25,7 @@ GitHub variable is `Linux`, `macOS`, or `Windows`. runs-on: ubuntu-latest steps: - name: Install Senzing API - uses: senzing-factory/github-action-install-senzing-api@v4 + uses: senzing-factory/github-action-install-senzing-api@v5 with: senzingapi-version: production-v3 ``` @@ -46,7 +43,7 @@ GitHub variable is `Linux`, `macOS`, or `Windows`. runs-on: ubuntu-latest steps: - name: Install Senzing API - uses: senzing-factory/github-action-install-senzing-api@v4 + uses: senzing-factory/github-action-install-senzing-api@v5 with: senzingapi-version: 3.6.0-23160 ``` @@ -65,7 +62,7 @@ GitHub variable is `Linux`, `macOS`, or `Windows`. runs-on: ubuntu-latest steps: - name: Install Senzing API - uses: senzing-factory/github-action-install-senzing-api@v4 + uses: senzing-factory/github-action-install-senzing-api@v5 with: packages-to-install: "senzingapi-runtime senzingapi-setup" senzingapi-version: 3.12.0 @@ -81,11 +78,6 @@ GitHub variable is `Linux`, `macOS`, or `Windows`. - `senzingapi-setup` - `senzingapi-tools` - `senzingdata-v` -- Version >= 4.0: - - `senzingapi-poc` - - `senzingapi-runtime` - - `senzingapi-setup` - - `senzingapi-tools` ### senzingapi-version diff --git a/action.yaml b/action.yaml index 0e93512..7fa649f 100644 --- a/action.yaml +++ b/action.yaml @@ -15,20 +15,20 @@ runs: steps: - if: runner.os == 'Linux' name: Run on Linux - uses: senzing-factory/github-action-install-senzing-api/linux@v4 + uses: senzing-factory/github-action-install-senzing-api/linux@v5 with: senzingapi-version: ${{ inputs.senzingapi-version }} packages-to-install: ${{ inputs.packages-to-install }} - if: runner.os == 'macOS' name: Run on macOS - uses: senzing-factory/github-action-install-senzing-api/darwin@v4 + uses: senzing-factory/github-action-install-senzing-api/darwin@v5 with: senzingapi-version: ${{ inputs.senzingapi-version }} - if: runner.os == 'Windows' name: Run on Windows - uses: senzing-factory/github-action-install-senzing-api/windows@v4 + uses: senzing-factory/github-action-install-senzing-api/windows@v5 with: senzingapi-version: ${{ inputs.senzingapi-version }} diff --git a/darwin/action.yaml b/darwin/action.yaml index 1237c86..abe3a15 100644 --- a/darwin/action.yaml +++ b/darwin/action.yaml @@ -1,4 +1,4 @@ -name: Install Senzing - darwin +name: Install Senzing API - darwin description: Install Senzing API on the darwin/macOS platform. author: support@senzing.com diff --git a/darwin/install-senzing.sh b/darwin/install-senzing.sh index 91f30bb..c1912e0 100755 --- a/darwin/install-senzing.sh +++ b/darwin/install-senzing.sh @@ -53,9 +53,10 @@ get-generic-major-version(){ is-major-version-greater-than-3() { if [[ $MAJOR_VERSION -gt 3 ]]; then - return 0 - else - return 1 + echo "[ERROR] this action only supports senzing major versions 3 and lower" + echo "[ERROR] please refer to https://github.com/senzing-factory/github-action-install-senzing-sdk" + echo "[ERROR] for installing senzing versions 4 and above" + exit 1 fi } @@ -70,6 +71,7 @@ is-major-version-greater-than-3() { determine-latest-dmg-for-major-version() { get-generic-major-version + is-major-version-greater-than-3 aws s3 ls $SENZINGAPI_URI --recursive --no-sign-request | grep -o -E '[^ ]+.dmg$' > /tmp/staging-versions latest_staging_version=$(< /tmp/staging-versions grep "_$MAJOR_VERSION" | sort -r | head -n 1 | grep -o '/.*') @@ -105,8 +107,7 @@ install-senzing() { ls -tlc /tmp/ hdiutil attach /tmp/senzingapi.dmg sudo mkdir -p /opt/senzing/ - is-major-version-greater-than-3 && SENZING_PATH="er" || SENZING_PATH="g2" - sudo cp -R /Volumes/SenzingAPI/senzing/"$SENZING_PATH" /opt/senzing + sudo cp -R /Volumes/SenzingAPI/senzing/g2 /opt/senzing } @@ -121,13 +122,12 @@ install-senzing() { verify-installation() { echo "[INFO] verify senzing installation" - is-major-version-greater-than-3 && BUILD_VERSION_PATH="er/szBuildVersion" || BUILD_VERSION_PATH="g2/g2BuildVersion" - if [ ! -f /opt/senzing/"$BUILD_VERSION_PATH".json ]; then - echo "[ERROR] /opt/senzing/$BUILD_VERSION_PATH.json not found." + if [ ! -f /opt/senzing/g2/g2BuildVersion.json ]; then + echo "[ERROR] /opt/senzing/g2/g2BuildVersion.json not found." exit 1 else - echo "[INFO] cat /opt/senzing/$BUILD_VERSION_PATH.json" - cat /opt/senzing/"$BUILD_VERSION_PATH".json + echo "[INFO] cat /opt/senzing/g2/g2BuildVersion.json" + cat /opt/senzing/g2/g2BuildVersion.json fi } diff --git a/docs/README.md b/docs/README.md index 3353430..492720d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,5 @@ -# github-action-install-senzing +# github-action-install-senzing-api Placeholder for [GitHub pages](https://pages.github.com/). -See [https://hub.senzing.com/github-action-install-senzing](https://hub.senzing.com/github-action-install-senzing). +See [https://hub.senzing.com/github-action-install-senzing-api](https://hub.senzing.com/github-action-install-senzing-api). diff --git a/docs/development.md b/docs/development.md index 8339af7..0f766fb 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1 +1 @@ -# github-action-install-senzing development +# github-action-install-senzing-api development diff --git a/docs/errors.md b/docs/errors.md index a084b38..fa169e2 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -1 +1 @@ -# github-action-install-senzing errors +# github-action-install-senzing-api errors diff --git a/docs/examples.md b/docs/examples.md index 2adc8c0..bdadc95 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -1 +1 @@ -# github-action-install-senzing examples +# github-action-install-senzing-api examples diff --git a/linux/action.yaml b/linux/action.yaml index 0c95187..bc2962a 100644 --- a/linux/action.yaml +++ b/linux/action.yaml @@ -1,5 +1,5 @@ -name: Install Senzing API Runtime - linux -description: Install Senzing API Runtime on the linux platform. +name: Install Senzing API - linux +description: Install Senzing API on the linux platform. author: support@senzing.com inputs: diff --git a/linux/install-senzing.sh b/linux/install-senzing.sh index 2e34a96..de4e9f1 100755 --- a/linux/install-senzing.sh +++ b/linux/install-senzing.sh @@ -11,48 +11,38 @@ set -e configure-vars() { # senzing apt repository packages - BETA_REPO=https://senzing-beta-apt.s3.amazonaws.com PROD_REPO=https://senzing-production-apt.s3.amazonaws.com STAGING_REPO=https://senzing-staging-apt.s3.amazonaws.com - # v3 and lower PROD_REPO_V3_AND_LOWER="$PROD_REPO/senzingrepo_1.0.1-1_all.deb" STAGING_REPO_V3_AND_LOWER="$STAGING_REPO/senzingstagingrepo_1.0.1-1_all.deb" - # v4 and above - BETA_REPO_V4_AND_ABOVE="$BETA_REPO/senzingbetarepo_2.0.1-1_all.deb" - PROD_REPO_V4_AND_ABOVE="$PROD_REPO/senzingrepo_2.0.1-1_all.deb" - STAGING_REPO_V4_AND_ABOVE="$STAGING_REPO/senzingstagingrepo_2.0.1-1_all.deb" # semantic versions REGEX_SEM_VER="^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$" # semantic version with build number REGEX_SEM_VER_BUILD_NUM="^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)-([0-9]){5}$" - if [[ $SENZING_INSTALL_VERSION =~ "beta" ]]; then - - echo "[INFO] install $PACKAGES_TO_INSTALL from beta" - get-generic-major-version - INSTALL_REPO="$BETA_REPO_V4_AND_ABOVE" - SENZING_PACKAGES="$PACKAGES_TO_INSTALL" - - elif [[ $SENZING_INSTALL_VERSION =~ "production" ]]; then + if [[ $SENZING_INSTALL_VERSION =~ "production" ]]; then echo "[INFO] install $PACKAGES_TO_INSTALL from production" get-generic-major-version - is-major-version-greater-than-3 && INSTALL_REPO="$PROD_REPO_V4_AND_ABOVE" || INSTALL_REPO="$PROD_REPO_V3_AND_LOWER" + is-major-version-greater-than-3 + INSTALL_REPO="$PROD_REPO_V3_AND_LOWER" SENZING_PACKAGES="$PACKAGES_TO_INSTALL" elif [[ $SENZING_INSTALL_VERSION =~ "staging" ]]; then echo "[INFO] install $PACKAGES_TO_INSTALL from staging" get-generic-major-version - is-major-version-greater-than-3 && INSTALL_REPO="$STAGING_REPO_V4_AND_ABOVE" || INSTALL_REPO="$STAGING_REPO_V3_AND_LOWER" + is-major-version-greater-than-3 + INSTALL_REPO="$STAGING_REPO_V3_AND_LOWER" SENZING_PACKAGES="$PACKAGES_TO_INSTALL" elif [[ $SENZING_INSTALL_VERSION =~ $REGEX_SEM_VER ]]; then echo "[INFO] install $PACKAGES_TO_INSTALL semantic version" get-semantic-major-version - is-major-version-greater-than-3 && INSTALL_REPO="$PROD_REPO_V4_AND_ABOVE" || INSTALL_REPO="$PROD_REPO_V3_AND_LOWER" + is-major-version-greater-than-3 + INSTALL_REPO="$PROD_REPO_V3_AND_LOWER" IFS=" " read -r -a packages <<< "$PACKAGES_TO_INSTALL" for package in "${packages[@]}" do @@ -68,7 +58,8 @@ configure-vars() { echo "[INFO] install $PACKAGES_TO_INSTALL semantic version with build number" get-semantic-major-version - is-major-version-greater-than-3 && INSTALL_REPO="$PROD_REPO_V4_AND_ABOVE" || INSTALL_REPO="$PROD_REPO_V3_AND_LOWER" + is-major-version-greater-than-3 + INSTALL_REPO="$PROD_REPO_V3_AND_LOWER" IFS=" " read -r -a packages <<< "$PACKAGES_TO_INSTALL" for package in "${packages[@]}" do @@ -129,9 +120,10 @@ get-semantic-major-version(){ is-major-version-greater-than-3() { if [[ $MAJOR_VERSION -gt 3 ]]; then - return 0 - else - return 1 + echo "[ERROR] this action only supports senzing major versions 3 and lower" + echo "[ERROR] please refer to https://github.com/senzing-factory/github-action-install-senzing-sdk" + echo "[ERROR] for installing senzing versions 4 and above" + exit 1 fi } @@ -218,13 +210,12 @@ verify-installation() { sudo apt list --installed | grep senzing echo "[INFO] verify senzing installation" - is-major-version-greater-than-3 && BUILD_VERSION_PATH="er/szBuildVersion" || BUILD_VERSION_PATH="g2/g2BuildVersion" - if [ ! -f "/opt/senzing/$BUILD_VERSION_PATH.json" ]; then - echo "[ERROR] /opt/senzing/$BUILD_VERSION_PATH.json not found." + if [ ! -f "/opt/senzing/g2/g2BuildVersion.json" ]; then + echo "[ERROR] /opt/senzing/g2/g2BuildVersion.json not found." exit 1 else - echo "[INFO] cat /opt/senzing/$BUILD_VERSION_PATH.json" - cat /opt/senzing/"$BUILD_VERSION_PATH".json + echo "[INFO] cat /opt/senzing/g2/g2BuildVersion.json" + cat /opt/senzing/g2/g2BuildVersion.json fi } diff --git a/windows/action.yaml b/windows/action.yaml index b0c4139..24c9ea1 100644 --- a/windows/action.yaml +++ b/windows/action.yaml @@ -1,5 +1,5 @@ # windows/action.yaml -name: Install Senzing - windows +name: Install Senzing API - windows description: Install Senzing API on the windows platform. author: support@senzing.com diff --git a/windows/install-senzing.sh b/windows/install-senzing.sh index b063698..5c3c960 100755 --- a/windows/install-senzing.sh +++ b/windows/install-senzing.sh @@ -53,9 +53,10 @@ get-generic-major-version(){ is-major-version-greater-than-3() { if [[ $MAJOR_VERSION -gt 3 ]]; then - return 0 - else - return 1 + echo "[ERROR] this action only supports senzing major versions 3 and lower" + echo "[ERROR] please refer to https://github.com/senzing-factory/github-action-install-senzing-sdk" + echo "[ERROR] for installing senzing versions 4 and above" + exit 1 fi } @@ -70,6 +71,7 @@ is-major-version-greater-than-3() { determine-latest-zip-for-major-version() { get-generic-major-version + is-major-version-greater-than-3 aws s3 ls $SENZINGAPI_URI --recursive --no-sign-request --region us-east-1 | grep -o -E '[^ ]+.zip$' > /tmp/staging-versions latest_staging_version=$(< /tmp/staging-versions grep "_$MAJOR_VERSION" | sort -r | head -n 1 | grep -o '/.*') @@ -113,13 +115,12 @@ install-senzingapi() { verify-installation() { echo "[INFO] verify senzingapi installation" - is-major-version-greater-than-3 && BUILD_VERSION_PATH="er/szBuildVersion" || BUILD_VERSION_PATH="g2/g2BuildVersion" - if [ ! -f "/c/Program Files/Senzing/$BUILD_VERSION_PATH.json" ]; then - echo "[ERROR] /c/Program Files/Senzing/$BUILD_VERSION_PATH.json not found." + if [ ! -f "/c/Program Files/Senzing/g2/g2BuildVersion.json" ]; then + echo "[ERROR] /c/Program Files/Senzing/g2/g2BuildVersion.json not found." exit 1 else - echo "[INFO] cat /c/Program Files/Senzing/$BUILD_VERSION_PATH.json" - cat "/c/Program Files/Senzing/$BUILD_VERSION_PATH.json" + echo "[INFO] cat /c/Program Files/Senzing/g2/g2BuildVersion.json" + cat "/c/Program Files/Senzing/g2/g2BuildVersion.json" fi }