Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
a6053d63
Commit
a6053d63
authored
Mar 13, 2019
by
Jakub Sztandera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mk: fix maketarball to work with gomod
License: MIT Signed-off-by:
Jakub Sztandera
<
kubuxu@protonmail.ch
>
parent
245c40b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
bin/maketarball.sh
bin/maketarball.sh
+9
-11
mk/golang.mk
mk/golang.mk
+4
-0
No files found.
bin/maketarball.sh
View file @
a6053d63
...
...
@@ -8,19 +8,17 @@ IFS=$'\n\t'
# readlink doesn't work on macos
OUTPUT
=
"
${
1
:-
go
-ipfs-source.tar.gz
}
"
if
!
[[
"
$OUTPUT
"
=
/
*
]]
;
then
OUTPUT
=
"
$PWD
/
$OUTPUT
"
OUTPUT
=
"
$PWD
/
$OUTPUT
"
fi
TMPDIR
=
"
$(
mktemp
-d
)
"
NEWIPFS
=
"
$TMPDIR
/src/github.com/ipfs/go-ipfs"
mkdir
-p
"
$NEWIPFS
"
cp
-r
.
"
$NEWIPFS
"
(
cd
"
$NEWIPFS
"
&&
echo
$PWD
&&
GOPATH
=
"
$TMPDIR
"
gx
install
--local
&&
(
git rev-parse
--short
HEAD
||
true
)
>
.tarball
&&
chmod
-R
u
=
rwX,go
=
rX
"
$NEWIPFS
"
# normalize permissions
tar
-czf
"
$OUTPUT
"
--exclude
=
"./.git"
.
)
cp
-r
.
"
$TMPDIR
"
(
cd
"
$TMPDIR
"
&&
echo
$PWD
&&
go mod vendor
&&
(
git describe
--always
--match
=
NeVeRmAtCh
--dirty
2>/dev/null
||
true
)
>
.tarball
&&
chmod
-R
u
=
rwX,go
=
rX
"
$TMPDIR
"
# normalize permissions
tar
-czf
"
$OUTPUT
"
--exclude
=
"./.git"
.
)
rm
-rf
"
$TMPDIR
"
mk/golang.mk
View file @
a6053d63
...
...
@@ -10,6 +10,10 @@ unexport GOFLAGS
GOFLAGS
?=
GOTFLAGS
?=
ifeq
($(tarball-is),1)
GOFLAGS
+=
-mod
=
vendor
endif
# match Go's default GOPATH behaviour
export
GOPATH
?=
$(
shell
$(GOCC)
env
GOPATH
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment