mirror of https://github.com/perkeep/perkeep.git
clients/android: handle missing keystore.properties in docker-based build
Signed-off-by: Sebastien Binet <binet@cern.ch>
This commit is contained in:
parent
e5fbf88029
commit
60bd47b272
|
@ -65,8 +65,22 @@ func buildApp() {
|
||||||
}
|
}
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
log.Fatalf("Error building Android app: %v", err)
|
if _, err := os.ReadFile("./keystore.properties"); err != nil {
|
||||||
|
// no keystore.
|
||||||
|
// generate one that's in line with the one from devenv/Dockerfile.
|
||||||
|
|
||||||
|
const keystore = `## Code generated by perkeep; DO NOT EDIT.
|
||||||
|
storeFile=/home/gopher/keystore
|
||||||
|
storePassword=gopher
|
||||||
|
keyAlias=perkeep
|
||||||
|
keyPassword=gopher
|
||||||
|
`
|
||||||
|
err = os.WriteFile("./keystore.properties", []byte(keystore), 0644)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("could not write default keystore.properties: %+v", err)
|
||||||
|
}
|
||||||
|
defer os.Remove("./keystore.properties")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue