Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Makefile new target: env-files #135

Closed
8 tasks done
sadikkuzu opened this issue Nov 11, 2023 · 0 comments · Fixed by #140
Closed
8 tasks done

Makefile new target: env-files #135

sadikkuzu opened this issue Nov 11, 2023 · 0 comments · Fixed by #140
Assignees
Labels
backend Related to backend frontend Related to frontend miscellaneous not related to coding or documentation
Milestone

Comments

@sadikkuzu
Copy link
Member

sadikkuzu commented Nov 11, 2023

Prerequisites

Motivation

docker-compose up and docker-compose down commands need existing .env files.
To ensure that, we may implement a new Makefile target, called env-files

Action Items

  • Create a new folder, called "hack", which contains shell scripts now and later on.
  • Implement shell scripts that create .env files if not exist (for both bash and powershell)
    • Check whether .env file exists (if yes, ok)
    • Check whether .env.sample file exists (if yes, copy .env.sample -> .env)
    • else: Create empty .env file
  • Make bash shell script executable
  • Locate these scripts into Makefile
  • Make this target prerequisite for compose-up and compose-down targets

Originally posted by @sadikkuzu in #120 (comment)

Later on, there may be some extension opportunities.

make env-files

env-files:
ifeq ($(OS),Windows_NT)
	powershell ./hack/env-files.ps1
else
	./hack/env-files.sh
endif

Reference: https://stackoverflow.com/q/714100/7030591

@sadikkuzu sadikkuzu self-assigned this Nov 11, 2023
@sadikkuzu sadikkuzu added the miscellaneous not related to coding or documentation label Nov 11, 2023
@sadikkuzu sadikkuzu added this to the Milestone 2 milestone Nov 11, 2023
@sadikkuzu sadikkuzu moved this to 📋 Backlog in SWE574-G1 Nov 11, 2023
@sadikkuzu sadikkuzu moved this from 📋 Backlog to 🔖 ToDo in SWE574-G1 Nov 12, 2023
@sadikkuzu sadikkuzu added backend Related to backend frontend Related to frontend labels Nov 12, 2023
sadikkuzu added a commit that referenced this issue Nov 12, 2023
sadikkuzu added a commit that referenced this issue Nov 12, 2023
@sadikkuzu sadikkuzu moved this from 🔖 ToDo to 🏗 In progress in SWE574-G1 Nov 12, 2023
sadikkuzu added a commit that referenced this issue Nov 12, 2023
sadikkuzu added a commit that referenced this issue Nov 12, 2023
@sadikkuzu sadikkuzu linked a pull request Nov 12, 2023 that will close this issue
@sadikkuzu sadikkuzu moved this from 🏗 In progress to 👀 In review in SWE574-G1 Nov 12, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in SWE574-G1 Nov 17, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
backend Related to backend frontend Related to frontend miscellaneous not related to coding or documentation
Projects
Status: ✅ Done
1 participant