Skip to content

Commit

Permalink
remove v4
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelsam committed Nov 13, 2024
1 parent 84371d8 commit d6e0886
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 134 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/make-go-tag.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/make-latest-tag.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 0 additions & 20 deletions Makefile

This file was deleted.

20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
Expand All @@ -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
```
Expand All @@ -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
Expand All @@ -81,11 +78,6 @@ GitHub variable is `Linux`, `macOS`, or `Windows`.
- `senzingapi-setup`
- `senzingapi-tools`
- `senzingdata-v<X>`
- Version >= 4.0:
- `senzingapi-poc`
- `senzingapi-runtime`
- `senzingapi-setup`
- `senzingapi-tools`

### senzingapi-version

Expand Down
6 changes: 3 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
2 changes: 1 addition & 1 deletion darwin/action.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
20 changes: 10 additions & 10 deletions darwin/install-senzing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
Expand All @@ -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 '/.*')
Expand Down Expand Up @@ -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

}

Expand All @@ -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

}
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -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).
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# github-action-install-senzing development
# github-action-install-senzing-api development
2 changes: 1 addition & 1 deletion docs/errors.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# github-action-install-senzing errors
# github-action-install-senzing-api errors
2 changes: 1 addition & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# github-action-install-senzing examples
# github-action-install-senzing-api examples
4 changes: 2 additions & 2 deletions linux/action.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
43 changes: 17 additions & 26 deletions linux/install-senzing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

}
Expand Down Expand Up @@ -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

}
Expand Down
2 changes: 1 addition & 1 deletion windows/action.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
17 changes: 9 additions & 8 deletions windows/install-senzing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
Expand All @@ -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 '/.*')
Expand Down Expand Up @@ -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

}
Expand Down

0 comments on commit d6e0886

Please sign in to comment.