Added non interactive makefile option; fixed flags again

fixed another problem with the -data option, and added 'make headless'
for use in the dockerfile
pull/20/head
Harvey Tindall 4 years ago
parent 8750efe101
commit 8c4bd4541c
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -6,7 +6,7 @@ RUN apk add --update make py3-pip curl sed npm build-base python3-dev
ADD . / /opt/build/
RUN (cd /opt/build; make all)
RUN (cd /opt/build; make headless)
RUN mv /opt/build/build /opt/jfa-go

@ -12,6 +12,18 @@ sass:
echo "Compiling sass"
python3 scss/compile.py
sass-headless:
echo "Getting libsass"
python3 -m pip install libsass
echo "Getting node dependencies"
python3 scss/get_node_deps.py
echo "Compiling sass"
python3 scss/compile.py -y
mail-headless:
echo "Generating email html"
python3 mail/generate.py -y
mail:
echo "Generating email html"
python3 mail/generate.py
@ -28,6 +40,7 @@ copy:
cp -r data build/
all: configuration sass mail compile copy
headless: configuration sass-headless mail-headless copy

@ -10,7 +10,7 @@ RUN apt install nodejs
ADD . / /opt/build/
RUN (cd /opt/build; make all)
RUN (cd /opt/build; make headless)
RUN mv /opt/build/build /opt/jfa-go

@ -114,6 +114,7 @@ func main() {
flag.Parse()
if app.config_path == *configPath && app.data_path != *dataPath {
app.data_path = *dataPath
app.config_path = filepath.Join(app.data_path, "config.ini")
} else if app.config_path != *configPath && app.data_path == *dataPath {
app.config_path = *configPath
} else {
@ -149,7 +150,7 @@ func main() {
var nConfig *os.File
nConfig, err := os.Create(app.config_path)
if err != nil {
app.err.Fatalf("Couldn't open config file for writing: \"%s\"", dConfigPath)
app.err.Fatalf("Couldn't open config file for writing: \"%s\"", app.config_path)
}
defer nConfig.Close()
_, err = io.Copy(nConfig, dConfig)

Loading…
Cancel
Save