Skip to content

Commit

Permalink
Fix regex to get package name
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 committed Dec 26, 2023
1 parent 78fcc3d commit 3cc9fbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/r_assemble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ jobs:

- name: Run `assemble.sh`
run: |
mkdir -p artifacts/dist
touch artifacts/dist/${{ inputs.name }}
bash scripts/assemble.sh -v ${{ vars.OPENSEARCH_VERSION }} -p linux -a ${{ inputs.architecture }} -d ${{ inputs.distribution }}
# The package's name is stored in artifacts/artifact_name.txt.
Expand Down
7 changes: 3 additions & 4 deletions scripts/assemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,8 @@ case $PLATFORM-$DISTRIBUTION-$ARCHITECTURE in
esac

echo "Assembling OpenSearch for $PLATFORM-$DISTRIBUTION-$ARCHITECTURE"

ARTIFACT_BUILD_NAME=$(ls "${OUTPUT}/dist/" | grep "wazuh-indexer-min.*$SUFFIX.$EXT")
# [WAZUH] Used by the GH workflow to upload the artifact
echo "$ARTIFACT_BUILD_NAME" >"$OUTPUT/artifact_name.txt"
# wazuh-indexer-min_4.9.0-1-x64_78fcc3db6a5b470294319e48b58c3d715bee39d1.rpm
ARTIFACT_BUILD_NAME=$(ls "${OUTPUT}/dist/" | grep "wazuh-indexer-min.*.$EXT")

# Create temporal directory and copy the min package there for extraction
TMP_DIR="${OUTPUT}/tmp/${TARGET}"
Expand Down Expand Up @@ -257,6 +255,7 @@ function assemble_rpm() {
cd ../../..
package_name="wazuh-indexer-${version}-1.${SUFFIX}.${EXT}"
cp "${TMP_DIR}/RPMS/${SUFFIX}/${package_name}" "${OUTPUT}/dist/"

echo "Cleaning temporary ${TMP_DIR} folder"
rm -r "${TMP_DIR}"
echo "After execution, shell path is $(pwd)"
Expand Down

0 comments on commit 3cc9fbc

Please sign in to comment.