From b1e17ad2b0090c51c0fb456818f65d7e21d71ee4 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:32:47 -0700 Subject: [PATCH] #59 switch from senzingapi to senzingapi-runtime (#60) * #59 switch to runtime * switch to branch * bump version --- action.yaml | 14 +++++++------- linux/action.yaml | 26 ++++++-------------------- linux/install-senzing.sh | 32 ++++++++++++++++---------------- 3 files changed, 29 insertions(+), 43 deletions(-) diff --git a/action.yaml b/action.yaml index a799bf1..daaa8fb 100644 --- a/action.yaml +++ b/action.yaml @@ -1,9 +1,9 @@ -name: Install Senzing API -description: Install Senzing API based on platform. +name: Install Senzing API Runtime +description: Install Senzing API Runtime based on platform. author: support@senzing.com inputs: - senzingapi-version: + senzingapi-runtime-version: description: Version of Senzing API to install required: true @@ -12,19 +12,19 @@ runs: steps: - if: runner.os == 'Linux' name: Run on Linux - uses: senzing-factory/github-action-install-senzing-api/linux@v2 + uses: senzing-factory/github-action-install-senzing-api/linux@v3 with: - senzingapi-version: ${{ inputs.senzingapi-version }} + senzingapi-runtime-version: ${{ inputs.senzingapi-runtime-version }} - if: runner.os == 'macOS' name: Run on macOS - uses: senzing-factory/github-action-install-senzing-api/darwin@v2 + uses: senzing-factory/github-action-install-senzing-api/darwin@v3 with: senzingapi-version: ${{ inputs.senzingapi-version }} - if: runner.os == 'Windows' name: Run on Windows - uses: senzing-factory/github-action-install-senzing-api/windows@v2 + uses: senzing-factory/github-action-install-senzing-api/windows@v3 with: senzingapi-version: ${{ inputs.senzingapi-version }} diff --git a/linux/action.yaml b/linux/action.yaml index b155379..14a875e 100644 --- a/linux/action.yaml +++ b/linux/action.yaml @@ -1,10 +1,10 @@ -name: Install Senzing - linux -description: Install Senzing API on the linux platform. +name: Install Senzing API Runtime - linux +description: Install Senzing API Runtime on the linux platform. author: support@senzing.com inputs: senzingapi-version: - description: Version of Senzing API to install + description: Version of Senzing API Runtime to install required: false default: latest @@ -16,28 +16,14 @@ runs: - env: SENZING_ACCEPT_EULA: I_ACCEPT_THE_SENZING_EULA - SENZING_INSTALL_VERSION: ${{ inputs.senzingapi-version }} - name: Install Senzing API + SENZING_INSTALL_VERSION: ${{ inputs.senzingapi-runtime-version }} + name: Install Senzing API Runtime shell: bash run: ${{ github.action_path }}/install-senzing.sh - # Adjust files for "system install". - - - name: Configure Senzing API - shell: bash - run: | - sudo mv /opt/senzing/data/4.0.0/* /opt/senzing/data/ - sudo mkdir /etc/opt/senzing - sudo cp /opt/senzing/g2/resources/templates/cfgVariant.json /etc/opt/senzing - sudo cp /opt/senzing/g2/resources/templates/customGn.txt /etc/opt/senzing - sudo cp /opt/senzing/g2/resources/templates/customOn.txt /etc/opt/senzing - sudo cp /opt/senzing/g2/resources/templates/customSn.txt /etc/opt/senzing - sudo cp /opt/senzing/g2/resources/templates/defaultGNRCP.config /etc/opt/senzing - sudo cp /opt/senzing/g2/resources/templates/stb.config /etc/opt/senzing - # Verify installation. - - name: Verify installed Senzing API version + - name: Verify installed Senzing API Runtime version shell: bash run: cat /opt/senzing/g2/g2BuildVersion.json diff --git a/linux/install-senzing.sh b/linux/install-senzing.sh index 8cf904e..c69807b 100755 --- a/linux/install-senzing.sh +++ b/linux/install-senzing.sh @@ -21,32 +21,32 @@ configure-vars() { if [[ $SENZING_INSTALL_VERSION =~ "production" ]]; then - echo "[INFO] install senzingapi from production" + echo "[INFO] install senzingapi-runtime from production" INSTALL_REPO="$PROD_REPO" - SENZING_PACKAGE="senzingapi" + SENZING_PACKAGE="senzingapi-runtime" restrict-major-version elif [[ $SENZING_INSTALL_VERSION =~ "staging" ]]; then - echo "[INFO] install senzingapi from staging" + echo "[INFO] install senzingapi-runtime from staging" INSTALL_REPO="$STAGING_REPO" - SENZING_PACKAGE="senzingapi" + SENZING_PACKAGE="senzingapi-runtime" restrict-major-version elif [[ $SENZING_INSTALL_VERSION =~ $REGEX_SEM_VER ]]; then - echo "[INFO] install senzingapi semantic version" + echo "[INFO] install senzingapi-runtime semantic version" INSTALL_REPO="$PROD_REPO" - SENZING_PACKAGE="senzingapi=$SENZING_INSTALL_VERSION*" + SENZING_PACKAGE="senzingapi-runtime=$SENZING_INSTALL_VERSION*" elif [[ $SENZING_INSTALL_VERSION =~ $REGEX_SEM_VER_BUILD_NUM ]]; then - echo "[INFO] install senzingapi semantic version with build number" + echo "[INFO] install senzingapi-runtime semantic version with build number" INSTALL_REPO="$PROD_REPO" - SENZING_PACKAGE="senzingapi=$SENZING_INSTALL_VERSION" + SENZING_PACKAGE="senzingapi-runtime=$SENZING_INSTALL_VERSION" else - echo "[ERROR] senzingapi install version $SENZING_INSTALL_VERSION is unsupported" + echo "[ERROR] senzingapi-runtime install version $SENZING_INSTALL_VERSION is unsupported" exit 1 fi @@ -62,12 +62,12 @@ configure-vars() { restrict-major-version() { MAJOR_VERSION=$(echo "$SENZING_INSTALL_VERSION" | grep -Eo '[0-9]+$') - senzingapi_preferences_file="/etc/apt/preferences.d/senzingapi" - echo "[INFO] restrict senzingapi major version to: $MAJOR_VERSION" + senzingapi_runtime_preferences_file="/etc/apt/preferences.d/senzingapi-runtime" + echo "[INFO] restrict senzingapi-runtime major version to: $MAJOR_VERSION" - echo "Package: senzingapi" | sudo tee -a $senzingapi_preferences_file - echo "Pin: version $MAJOR_VERSION.*" | sudo tee -a $senzingapi_preferences_file - echo "Pin-Priority: 999" | sudo tee -a $senzingapi_preferences_file + echo "Package: senzingapi-runtime" | sudo tee -a $senzingapi_runtime_preferences_file + echo "Pin: version $MAJOR_VERSION.*" | sudo tee -a $senzingapi_runtime_preferences_file + echo "Pin-Priority: 999" | sudo tee -a $senzingapi_runtime_preferences_file } @@ -94,7 +94,7 @@ install-senzing-repository() { # SENZING_PACKAGE # full package name used for install ############################################ -install-senzingapi() { +install-senzingapi-runtime() { echo "[INFO] sudo --preserve-env apt-get -y install $SENZING_PACKAGE" sudo --preserve-env apt-get -y install "$SENZING_PACKAGE" @@ -108,4 +108,4 @@ install-senzingapi() { echo "[INFO] senzing version to install is: $SENZING_INSTALL_VERSION" configure-vars install-senzing-repository -install-senzingapi \ No newline at end of file +install-senzingapi-runtime \ No newline at end of file