File: backwords_compat.sh

package info (click to toggle)
golang-gitlab-gitlab-org-labkit 1.17.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,092 kB
  • sloc: sh: 210; javascript: 49; makefile: 4
file content (19 lines) | stat: -rwxr-xr-x 379 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env sh

set -eux

repo=$1
cloneDir=$(mktemp -d)
CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(pwd)}

git clone --depth 1 "$repo" "$cloneDir"
cd "$cloneDir"

go mod edit -replace=gitlab.com/gitlab-org/labkit="$CI_PROJECT_DIR"

# Ensure go.mod and go.sum are up to date in the cloned repo, otherwise build may fail.
go mod tidy -compat=1.18

make -j "$(nproc)"

rm -rf "$cloneDir"