Skip to content

Commit

Permalink
feat: improve nuget installation and binary caching configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mjcr99 committed Feb 13, 2025
1 parent bca60a2 commit 35cf18f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
13 changes: 1 addition & 12 deletions packages/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,6 @@ set_vcpkg_remote_binary_cache(){

if [[ $(mono --version 2>/dev/null) =~ [0-9] ]]; then
echo "mono already installed, proceeding"

git clone --branch master --single-branch https://github.com/microsoft/vcpkg.git
pushd vcpkg

export VCPKG_ROOT="$(pwd)"

git checkout "2024.09.30"

export VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite"
NUGET_PATH="/usr/local/bin/nuget"
curl -o $NUGET_PATH https://dist.nuget.org/win-x86-commandline/v6.10.2/nuget.exe
mono $NUGET_PATH \
Expand All @@ -90,9 +81,7 @@ set_vcpkg_remote_binary_cache(){
-password "$vcpkg_token"
mono $NUGET_PATH \
setapikey "$vcpkg_token" \
-source "https://nuget.pkg.github.com/wazuh/index.json"

popd
-source "https://nuget.pkg.github.com/wazuh/index.json"
else
echo "mono in not installed, remote binary caching not being enabled"
fi
Expand Down
2 changes: 1 addition & 1 deletion packages/debs/SPECS/wazuh-agent/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: wazuh-agent
Section: admin
Priority: extra
Maintainer: Wazuh, Inc <[email protected]>
Build-Depends: debhelper (>= 7.0.50~), make, gcc, linux-libc-dev, gawk, libaudit-dev, selinux-basics
Build-Depends: debhelper (>= 7.0.50~), make, gcc, linux-libc-dev, gawk, selinux-basics
Standards-Version: 3.8.4
Homepage: https://www.wazuh.com

Expand Down
3 changes: 3 additions & 0 deletions packages/generate_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SYSTEM="deb"
OUTDIR="${CURRENT_PATH}/output/"
BRANCH=""
VCPKG_KEY=""
VCPKG_BINARY_SOURCES=""
REVISION="0"
TARGET="agent"
JOBS="2"
Expand Down Expand Up @@ -77,6 +78,7 @@ build_pkg() {
-e WAZUH_BRANCH="${BRANCH}" \
-e WAZUH_VERBOSE="${VERBOSE}" \
-e VCPKG_KEY="${VCPKG_KEY}" \
-e VCPKG_BINARY_SOURCES="${VCPKG_BINARY_SOURCES}" \
${CUSTOM_CODE_VOL} \
-v ${DOCKERFILE_PATH}:/home:Z \
${CONTAINER_NAME}:${DOCKER_TAG} \
Expand Down Expand Up @@ -237,6 +239,7 @@ main() {
"--vcpkg-binary-caching-key")
if [ -n "$2" ]; then
VCPKG_KEY="$2"
VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite"
shift 2
else
help 1
Expand Down

0 comments on commit 35cf18f

Please sign in to comment.