mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 09:00:10 +00:00
Added non interactive makefile option; fixed flags again
fixed another problem with the -data option, and added 'make headless' for use in the dockerfile
This commit is contained in:
parent
8750efe101
commit
8c4bd4541c
@ -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
|
||||
|
||||
|
13
Makefile
13
Makefile
@ -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
|
||||
|
||||
|
3
main.go
3
main.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…
Reference in New Issue
Block a user