Skip to content

Commit

Permalink
add moose script
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszWojciechO committed Oct 25, 2024
1 parent 1b6486f commit dda01c0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 47 deletions.
13 changes: 13 additions & 0 deletions ci/add_moose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

go mod edit -require=moose/[email protected]
go mod edit -require=moose/[email protected]
go mod edit -replace=moose/events=./third-party/moose-events/nordvpnapp/moosenordvpnappgo
go mod edit -replace=moose/worker=./third-party/moose-worker/mooseworkergo
function revert_moose_patch {
go mod edit -droprequire=moose/events
go mod edit -droprequire=moose/worker
go mod edit -dropreplace=moose/events
go mod edit -dropreplace=moose/worker
}
trap revert_moose_patch EXIT
12 changes: 1 addition & 11 deletions ci/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,7 @@ if [[ $tags == *"moose"* ]]; then
-X 'main.EventsDomain=${events_domain:-""}' \
-X 'main.EventsSubdomain=${EVENTS_SUBDOMAIN:-""}'"

go mod edit -require=moose/[email protected]
go mod edit -require=moose/[email protected]
go mod edit -replace=moose/events=./third-party/moose-events/nordvpnapp/moosenordvpnappgo
go mod edit -replace=moose/worker=./third-party/moose-worker/mooseworkergo
function revert_moose_patch {
go mod edit -droprequire=moose/events
go mod edit -droprequire=moose/worker
go mod edit -dropreplace=moose/events
go mod edit -dropreplace=moose/worker
}
trap revert_moose_patch EXIT
source "${WORKDIR}"/ci/add_moose.sh
fi

for program in ${!names_map[*]}; do # looping over keys
Expand Down
6 changes: 0 additions & 6 deletions ci/set_bindings_version.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#!/usr/bin/env bash
set -euxo pipefail

function get_current_version {
partial_module_path=$1
#
full_module_path=$(go list -m all | grep $partial_module_path)
}

declare -A LIB_NAME_TO_PACKAGE=(
[libtelio]=github.com/NordSecurity/libtelio-go
[libdrop]=github.com/NordSecurity/libdrop-go
Expand Down
6 changes: 1 addition & 5 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ tags="internal"
# everything
if [ "${1:-""}" = "full" ]; then
# Apply moose patch in case compiling with moose
git apply "${WORKDIR}"/contrib/patches/add_moose.diff
function revert_moose_patch {
git apply -R "${WORKDIR}"/contrib/patches/add_moose.diff
}
trap revert_moose_patch EXIT
source "${WORKDIR}"/ci/add_moose.sh

excluded_packages="thisshouldneverexist"
excluded_categories="root,link"
Expand Down
25 changes: 0 additions & 25 deletions contrib/patches/add_moose.diff

This file was deleted.

0 comments on commit dda01c0

Please sign in to comment.