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
Show 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
...
@@ -12,15 +12,13 @@ if ! [[ "$OUTPUT" = /* ]]; then
...
@@ -12,15 +12,13 @@ if ! [[ "$OUTPUT" = /* ]]; then
fi
fi
TMPDIR
=
"
$(
mktemp
-d
)
"
TMPDIR
=
"
$(
mktemp
-d
)
"
NEWIPFS
=
"
$TMPDIR
/src/github.com/ipfs/go-ipfs"
cp
-r
.
"
$TMPDIR
"
mkdir
-p
"
$NEWIPFS
"
(
cd
"
$TMPDIR
"
&&
cp
-r
.
"
$NEWIPFS
"
(
cd
"
$NEWIPFS
"
&&
echo
$PWD
&&
echo
$PWD
&&
GOPATH
=
"
$TMPDIR
"
gx
install
--local
&&
go mod vendor
&&
(
git
rev-parse
--short
HEAD
||
true
)
>
.tarball
&&
(
git
describe
--always
--match
=
NeVeRmAtCh
--dirty
2>/dev/null
||
true
)
>
.tarball
&&
chmod
-R
u
=
rwX,go
=
rX
"
$
NEWIPFS
"
# normalize permissions
chmod
-R
u
=
rwX,go
=
rX
"
$
TMPDIR
"
# normalize permissions
tar
-czf
"
$OUTPUT
"
--exclude
=
"./.git"
.
tar
-czf
"
$OUTPUT
"
--exclude
=
"./.git"
.
)
)
rm
-rf
"
$TMPDIR
"
rm
-rf
"
$TMPDIR
"
mk/golang.mk
View file @
a6053d63
...
@@ -10,6 +10,10 @@ unexport GOFLAGS
...
@@ -10,6 +10,10 @@ unexport GOFLAGS
GOFLAGS
?=
GOFLAGS
?=
GOTFLAGS
?=
GOTFLAGS
?=
ifeq
($(tarball-is),1)
GOFLAGS
+=
-mod
=
vendor
endif
# match Go's default GOPATH behaviour
# match Go's default GOPATH behaviour
export
GOPATH
?=
$(
shell
$(GOCC)
env
GOPATH
)
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