good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
a7dfaa0b
Unverified
Commit
a7dfaa0b
authored
Nov 18, 2019
by
Péter Szilágyi
Browse files
Options
Downloads
Patches
Plain Diff
build, internal/build: drop own file/folder copier
parent
e1dcea8b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/ci.go
+10
-6
10 additions, 6 deletions
build/ci.go
internal/build/util.go
+0
-45
0 additions, 45 deletions
internal/build/util.go
with
10 additions
and
51 deletions
build/ci.go
+
10
−
6
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
)
...
...
This diff is collapsed.
Click to expand it.
internal/build/util.go
+
0
−
45
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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment