mirror of
https://github.com/bluszcz/cutego.git
synced 2024-09-28 21:25:16 +03:00
fix docker deployment issue on linux
This commit is contained in:
parent
521980c887
commit
383164b950
8 changed files with 46 additions and 32 deletions
|
@ -16,8 +16,6 @@ Status
|
|||
|
||||
Almost all Qt functions and classes are accessible from Go and you should be able to find everything you need to build fully featured applications.
|
||||
|
||||
(A special exception are the WebEngine/WebView packages, these aren't available for Windows yet.)
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
|
|
|
@ -74,7 +74,11 @@ func GenModule(m, target string, mode int) {
|
|||
|
||||
if utils.QT_DOCKER() {
|
||||
if idug, ok := os.LookupEnv("IDUG"); ok {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, utils.GoQtPkgPath(strings.ToLower(m))), "chown files to user")
|
||||
if path := utils.GoQtPkgPath(strings.ToLower(m)); utils.UseGOMOD(path) {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, filepath.Dir(utils.GOMOD(path))), "chown files to user")
|
||||
} else {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, path), "chown files to user")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -338,7 +338,7 @@ func virtual(arg []string, target, path string, writeCacheToHost bool, docker bo
|
|||
if err != nil {
|
||||
utils.Log.WithError(err).Error("failed to lookup current user")
|
||||
} else {
|
||||
args = append(args, "-u", fmt.Sprintf("%v:%v", u.Uid, u.Gid), "-e", fmt.Sprintf("IDUG=%v:%v", u.Uid, u.Gid))
|
||||
args = append(args, "-e", fmt.Sprintf("IDUG=%v:%v", u.Uid, u.Gid))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -883,7 +883,11 @@ func bundle(mode, target, path, name, depPath string, tagsCustom string, fast bo
|
|||
|
||||
if utils.QT_DOCKER() {
|
||||
if idug, ok := os.LookupEnv("IDUG"); ok {
|
||||
if utils.UseGOMOD(path) {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, filepath.Dir(utils.GOMOD(path))), "chown files to user")
|
||||
} else {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, path), "chown files to user")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,10 +74,14 @@ func Moc(path, target, tags string, fast, slow, deploying bool) {
|
|||
|
||||
if !deploying && utils.QT_DOCKER() {
|
||||
if idug, ok := os.LookupEnv("IDUG"); ok {
|
||||
if utils.UseGOMOD(path) {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, filepath.Dir(utils.GOMOD(path))), "chown files to user")
|
||||
} else {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, path), "chown files to user")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func moc(path, target, tags string, fast, slow, root bool, l int, dirty bool) {
|
||||
utils.Log.WithField("path", path).WithField("target", target).Debug("start Moc")
|
||||
|
|
|
@ -48,10 +48,14 @@ func Rcc(path, target, tagsCustom, output_dir string, useuic, quickcompiler, dep
|
|||
|
||||
if !deploying && utils.QT_DOCKER() {
|
||||
if idug, ok := os.LookupEnv("IDUG"); ok {
|
||||
if utils.UseGOMOD(path) {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, filepath.Dir(utils.GOMOD(path))), "chown files to user")
|
||||
} else {
|
||||
utils.RunCmd(exec.Command("chown", "-R", idug, path), "chown files to user")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func rcc(path, target, tagsCustom, output_dir string, quickcompiler bool, useuic bool, root bool) {
|
||||
utils.Log.WithField("path", path).WithField("target", target).Debug("start Rcc")
|
||||
|
|
|
@ -175,7 +175,7 @@ func Test(target string, docker, vagrant bool, vagrantsystem string) {
|
|||
vagrantsystem,
|
||||
false,
|
||||
true,
|
||||
!strings.HasPrefix(target, "sailfish"),
|
||||
false, //TODO: re-enable once quickcompiler files can be properly cleaned up automatically !strings.HasPrefix(target, "sailfish"),
|
||||
)
|
||||
templater.CleanupDepsForCI()
|
||||
templater.CleanupDepsForCI = func() {}
|
||||
|
|
|
@ -194,52 +194,52 @@ jobs:
|
|||
file: windows_32_shared/Dockerfile
|
||||
tag: windows_32_shared
|
||||
dep:
|
||||
- windows_32_shared_base
|
||||
# - windows_32_shared_base
|
||||
- linux
|
||||
-
|
||||
template: docker_job_template.yml
|
||||
parameters:
|
||||
file: windows_32_shared/Dockerfile.base
|
||||
tag: windows_32_shared_base
|
||||
# -
|
||||
# template: docker_job_template.yml
|
||||
# parameters:
|
||||
# file: windows_32_shared/Dockerfile.base
|
||||
# tag: windows_32_shared_base
|
||||
-
|
||||
template: docker_job_template.yml
|
||||
parameters:
|
||||
file: windows_32_static/Dockerfile
|
||||
tag: windows_32_static
|
||||
dep:
|
||||
- windows_32_static_base
|
||||
# - windows_32_static_base
|
||||
- linux
|
||||
-
|
||||
template: docker_job_template.yml
|
||||
parameters:
|
||||
file: windows_32_static/Dockerfile.base
|
||||
tag: windows_32_static_base
|
||||
# -
|
||||
# template: docker_job_template.yml
|
||||
# parameters:
|
||||
# file: windows_32_static/Dockerfile.base
|
||||
# tag: windows_32_static_base
|
||||
-
|
||||
template: docker_job_template.yml
|
||||
parameters:
|
||||
file: windows_64_shared/Dockerfile
|
||||
tag: windows_64_shared
|
||||
dep:
|
||||
- windows_64_shared_base
|
||||
# - windows_64_shared_base
|
||||
- linux
|
||||
-
|
||||
template: docker_job_template.yml
|
||||
parameters:
|
||||
file: windows_64_shared/Dockerfile.base
|
||||
tag: windows_64_shared_base
|
||||
# -
|
||||
# template: docker_job_template.yml
|
||||
# parameters:
|
||||
# file: windows_64_shared/Dockerfile.base
|
||||
# tag: windows_64_shared_base
|
||||
-
|
||||
template: docker_job_template.yml
|
||||
parameters:
|
||||
file: windows_64_static/Dockerfile
|
||||
tag: windows_64_static
|
||||
dep:
|
||||
- windows_64_static_base
|
||||
# - windows_64_static_base
|
||||
- linux
|
||||
-
|
||||
template: docker_job_template.yml
|
||||
parameters:
|
||||
file: windows_64_static/Dockerfile.base
|
||||
tag: windows_64_static_base
|
||||
# -
|
||||
# template: docker_job_template.yml
|
||||
# parameters:
|
||||
# file: windows_64_static/Dockerfile.base
|
||||
# tag: windows_64_static_base
|
||||
-
|
||||
template: docker_job_template.yml
|
||||
parameters:
|
||||
|
|
Loading…
Reference in a new issue