Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
a7dfaa0b
Unverified
Commit
a7dfaa0b
authored
Nov 18, 2019
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build, internal/build: drop own file/folder copier
parent
e1dcea8b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
51 deletions
+10
-51
ci.go
build/ci.go
+10
-6
util.go
internal/build/util.go
+0
-45
No files found.
build/ci.go
View file @
a7dfaa0b
...
@@ -59,6 +59,7 @@ import (
...
@@ -59,6 +59,7 @@ import (
"strings"
"strings"
"time"
"time"
"github.com/cespare/cp"
"github.com/ethereum/go-ethereum/internal/build"
"github.com/ethereum/go-ethereum/internal/build"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/params"
)
)
...
@@ -516,8 +517,9 @@ func doDebianSource(cmdline []string) {
...
@@ -516,8 +517,9 @@ func doDebianSource(cmdline []string) {
log
.
Fatalf
(
"Failed to rename Go source folder: %v"
,
err
)
log
.
Fatalf
(
"Failed to rename Go source folder: %v"
,
err
)
}
}
// Add all dependency modules in compressed form
// Add all dependency modules in compressed form
build
.
CopyFolder
(
filepath
.
Join
(
pkgdir
,
".mod"
,
"cache"
,
"download"
),
filepath
.
Join
(
gobuild
.
Default
.
GOPATH
,
"pkg"
,
"mod"
,
"cache"
,
"download"
),
0755
)
if
err
:=
cp
.
CopyAll
(
filepath
.
Join
(
pkgdir
,
".mod"
,
"cache"
,
"download"
),
filepath
.
Join
(
gobuild
.
Default
.
GOPATH
,
"pkg"
,
"mod"
,
"cache"
,
"download"
));
err
!=
nil
{
log
.
Fatalf
(
"Failed to copy Go module dependencies: %v"
,
err
)
}
// Run the packaging and upload to the PPA
// Run the packaging and upload to the PPA
debuild
:=
exec
.
Command
(
"debuild"
,
"-S"
,
"-sa"
,
"-us"
,
"-uc"
,
"-d"
,
"-Zxz"
)
debuild
:=
exec
.
Command
(
"debuild"
,
"-S"
,
"-sa"
,
"-us"
,
"-uc"
,
"-d"
,
"-Zxz"
)
debuild
.
Dir
=
pkgdir
debuild
.
Dir
=
pkgdir
...
@@ -783,9 +785,12 @@ func doWindowsInstaller(cmdline []string) {
...
@@ -783,9 +785,12 @@ func doWindowsInstaller(cmdline []string) {
build
.
Render
(
"build/nsis.uninstall.nsh"
,
filepath
.
Join
(
*
workdir
,
"uninstall.nsh"
),
0644
,
allTools
)
build
.
Render
(
"build/nsis.uninstall.nsh"
,
filepath
.
Join
(
*
workdir
,
"uninstall.nsh"
),
0644
,
allTools
)
build
.
Render
(
"build/nsis.pathupdate.nsh"
,
filepath
.
Join
(
*
workdir
,
"PathUpdate.nsh"
),
0644
,
nil
)
build
.
Render
(
"build/nsis.pathupdate.nsh"
,
filepath
.
Join
(
*
workdir
,
"PathUpdate.nsh"
),
0644
,
nil
)
build
.
Render
(
"build/nsis.envvarupdate.nsh"
,
filepath
.
Join
(
*
workdir
,
"EnvVarUpdate.nsh"
),
0644
,
nil
)
build
.
Render
(
"build/nsis.envvarupdate.nsh"
,
filepath
.
Join
(
*
workdir
,
"EnvVarUpdate.nsh"
),
0644
,
nil
)
build
.
CopyFile
(
filepath
.
Join
(
*
workdir
,
"SimpleFC.dll"
),
"build/nsis.simplefc.dll"
,
0755
)
if
err
:=
cp
.
CopyFile
(
filepath
.
Join
(
*
workdir
,
"SimpleFC.dll"
),
"build/nsis.simplefc.dll"
);
err
!=
nil
{
build
.
CopyFile
(
filepath
.
Join
(
*
workdir
,
"COPYING"
),
"COPYING"
,
0755
)
log
.
Fatal
(
"Failed to copy SimpleFC.dll: %v"
,
err
)
}
if
err
:=
cp
.
CopyFile
(
filepath
.
Join
(
*
workdir
,
"COPYING"
),
"COPYING"
);
err
!=
nil
{
log
.
Fatal
(
"Failed to copy copyright note: %v"
,
err
)
}
// Build the installer. This assumes that all the needed files have been previously
// Build the installer. This assumes that all the needed files have been previously
// built (don't mix building and packaging to keep cross compilation complexity to a
// built (don't mix building and packaging to keep cross compilation complexity to a
// minimum).
// minimum).
...
@@ -802,7 +807,6 @@ func doWindowsInstaller(cmdline []string) {
...
@@ -802,7 +807,6 @@ func doWindowsInstaller(cmdline []string) {
"/DARCH="
+*
arch
,
"/DARCH="
+*
arch
,
filepath
.
Join
(
*
workdir
,
"geth.nsi"
),
filepath
.
Join
(
*
workdir
,
"geth.nsi"
),
)
)
// Sign and publish installer.
// Sign and publish installer.
if
err
:=
archiveUpload
(
installer
,
*
upload
,
*
signer
);
err
!=
nil
{
if
err
:=
archiveUpload
(
installer
,
*
upload
,
*
signer
);
err
!=
nil
{
log
.
Fatal
(
err
)
log
.
Fatal
(
err
)
...
...
internal/build/util.go
View file @
a7dfaa0b
...
@@ -118,51 +118,6 @@ func render(tpl *template.Template, outputFile string, outputPerm os.FileMode, x
...
@@ -118,51 +118,6 @@ func render(tpl *template.Template, outputFile string, outputPerm os.FileMode, x
}
}
}
}
// CopyFile copies a file.
func
CopyFile
(
dst
,
src
string
,
mode
os
.
FileMode
)
{
if
err
:=
os
.
MkdirAll
(
filepath
.
Dir
(
dst
),
0755
);
err
!=
nil
{
log
.
Fatal
(
err
)
}
destFile
,
err
:=
os
.
OpenFile
(
dst
,
os
.
O_CREATE
|
os
.
O_WRONLY
|
os
.
O_TRUNC
,
mode
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
defer
destFile
.
Close
()
srcFile
,
err
:=
os
.
Open
(
src
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
defer
srcFile
.
Close
()
if
_
,
err
:=
io
.
Copy
(
destFile
,
srcFile
);
err
!=
nil
{
log
.
Fatal
(
err
)
}
}
// CopyFolder copies a folder.
func
CopyFolder
(
dst
,
src
string
,
mode
os
.
FileMode
)
{
if
err
:=
os
.
MkdirAll
(
dst
,
mode
);
err
!=
nil
{
log
.
Fatal
(
err
)
}
dir
,
_
:=
os
.
Open
(
src
)
objects
,
err
:=
dir
.
Readdir
(
-
1
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
for
_
,
obj
:=
range
objects
{
srcPath
:=
filepath
.
Join
(
src
,
obj
.
Name
())
dstPath
:=
filepath
.
Join
(
dst
,
obj
.
Name
())
if
obj
.
IsDir
()
{
CopyFolder
(
dstPath
,
srcPath
,
mode
)
}
else
{
CopyFile
(
dstPath
,
srcPath
,
mode
)
}
}
}
// GoTool returns the command that runs a go tool. This uses go from GOROOT instead of PATH
// GoTool returns the command that runs a go tool. This uses go from GOROOT instead of PATH
// so that go commands executed by build use the same version of Go as the 'host' that runs
// so that go commands executed by build use the same version of Go as the 'host' that runs
// build code. e.g.
// build code. e.g.
...
...
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