Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab-runner: new submission #3081

Merged
merged 3 commits into from Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion _resources/port1.0/group/golang-1.0.tcl
Expand Up @@ -258,6 +258,7 @@ proc handle_set_go_vendors {vendors_str} {
#
# - GitHub: ${author}-${project}-${7-digit hash}
# - Bitbucket: ${author}-${project}-${12-digit hash}
# - GitLab: ${project}-${ref}
#
# Support for additional hosts not conforming to this pattern will take some
# work.
Expand All @@ -267,7 +268,14 @@ post-extract {
# as the result will not be accurate when go.package has been
# customized.
file mkdir [file dirname ${worksrcpath}]
move [glob ${workpath}/${go.author}-${go.project}-*] ${worksrcpath}
if [file exists [glob -nocomplain ${workpath}/${go.author}-${go.project}-*]] {
# GitHub and Bitbucket follow this path
move [glob ${workpath}/${go.author}-${go.project}-*] ${worksrcpath}
} else {
# GitLab follows this path
move [glob ${workpath}/${go.project}-*] ${worksrcpath}
}
# If the above fails then something went wrong and we should error out.
}

foreach vlist ${go.vendors_internal} {
Expand Down
41 changes: 41 additions & 0 deletions devel/gitlab-runner/Portfile
@@ -0,0 +1,41 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup golang 1.0

go.setup gitlab.com/gitlab-org/gitlab-runner 11.5.1 v

categories devel
platforms darwin
supported_archs x86_64
maintainers @breun openmaintainer
license MIT

description GitLab Runner
long_description GitLab Runner is the open source project that is used to \
run your jobs and send the results back to GitLab. It is \
used in conjunction with GitLab CI, the open-source \
continuous integration service included with GitLab that \
coordinates the jobs.

homepage https://docs.gitlab.com/runner/

master_sites https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v${version}/
distname gitlab-runner-v${version}

checksums rmd160 6034424f1d413f545abe0b7d91954be1cfa9bc6a \
sha256 cd9df3755e5606e8bdf426a6743ecf2c3c9ab497facce5f467bda3aefd2164c7 \
size 25750143

# Reproduce the "build_simple" target from the upstream Makefile
set go_ldflags "-X ${go.package}/common.NAME=${go.package} \
-X ${go.package}/common.VERSION=${version} \
-X ${go.package}/common.REVISION=unknown \
-X ${go.package}/common.BUILT=unknown \
-X ${go.package}/common.BRANCH=unknown \
-s -w"
build.args -ldflags \"${go_ldflags}\" -o out/binaries/${name} ${go.package}

destroot {
xinstall -m 0755 ${worksrcpath}/out/binaries/${name} ${destroot}${prefix}/bin/${name}
}