Run consumer release commands through Go tools
This commit is contained in:
@@ -40,14 +40,12 @@ steps:
|
||||
if [ "$${module_dir}" != . ]; then
|
||||
module_path="$${CI_WORKSPACE}/$${module_dir}"
|
||||
fi
|
||||
cp "$${module_path}/go.mod" "$${bootstrap_dir}/go.mod"
|
||||
cp "$${module_path}/go.mod" "$${bootstrap_dir}/releasekit.mod"
|
||||
if [ -f "$${module_path}/go.sum" ]; then
|
||||
cp "$${module_path}/go.sum" "$${bootstrap_dir}/go.sum"
|
||||
cp "$${module_path}/go.sum" "$${bootstrap_dir}/releasekit.sum"
|
||||
else
|
||||
: > "$${bootstrap_dir}/go.sum"
|
||||
: > "$${bootstrap_dir}/releasekit.sum"
|
||||
fi
|
||||
cp "$${bootstrap_dir}/go.mod" "$${bootstrap_dir}/releasekit.mod"
|
||||
cp "$${bootstrap_dir}/go.sum" "$${bootstrap_dir}/releasekit.sum"
|
||||
|
||||
export GOWORK=off
|
||||
export GOTOOLCHAIN=local
|
||||
@@ -55,13 +53,13 @@ steps:
|
||||
(
|
||||
cd "$${module_path}"
|
||||
go list -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" -m "$${releasekit_module}"
|
||||
go build -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" \
|
||||
-o "$${bootstrap_dir}/releasekit" "$${releasekit_module}/cmd/releasekit"
|
||||
go mod edit -modfile="$${bootstrap_dir}/releasekit.mod" -tool="$${releasekit_module}/cmd/releasekit"
|
||||
go list -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" -deps "$${releasekit_module}/cmd/releasekit" > /dev/null
|
||||
go tool -modfile="$${bootstrap_dir}/releasekit.mod" releasekit ci-deliver \
|
||||
--repo "$${CI_WORKSPACE}" \
|
||||
--config "$${profile_path}" \
|
||||
--expected-module "$${module_dir}" \
|
||||
--prepared \
|
||||
--commit "$${expected_commit}" \
|
||||
"$${CI_COMMIT_TAG}"
|
||||
)
|
||||
"$${bootstrap_dir}/releasekit" ci-deliver \
|
||||
--repo "$${CI_WORKSPACE}" \
|
||||
--config "$${profile_path}" \
|
||||
--expected-module "$${module_dir}" \
|
||||
--prepared \
|
||||
--commit "$${expected_commit}" \
|
||||
"$${CI_COMMIT_TAG}"
|
||||
|
||||
Reference in New Issue
Block a user