GithubHelp home page GithubHelp logo

[DOCS] Example of .env about mumain HOT 2 CLOSED

rafaelvieiras avatar rafaelvieiras commented on June 24, 2024
[DOCS] Example of .env

from mumain.

Comments (2)

Mosch0512 avatar Mosch0512 commented on June 24, 2024 1

I will add an wiki on how to get it going on Rider or CLion depending on what is better working here. Depending on if i get it running lol xD.

Edit:
For Windows only

from mumain.

rafaelvieiras avatar rafaelvieiras commented on June 24, 2024

I extract all environment variables on project based on the pattern $(VAR) using this bash:

#!/bin/bash

PROJECT_DIR="./"

OUTPUT_FILE="unique_vars.txt"
TEMP_FILE="temp_vars.txt"

: >"$OUTPUT_FILE"
: >"$TEMP_FILE"

REGEX='\$\([a-zA-Z0-9_]*\)'

find "$PROJECT_DIR" -type f | while read -r file; do
    if [[ "$file" != "./$OUTPUT_FILE" && "$file" != "./$TEMP_FILE" ]]; then

        grep -oP "$REGEX" "$file" | while read -r var; do
            if ! grep -q "$var" "$TEMP_FILE"; then
                echo "$var" >>"$TEMP_FILE"
            fi
        done
    fi
done

sort "$TEMP_FILE" | uniq >"$OUTPUT_FILE"

rm "$TEMP_FILE"

cat "$OUTPUT_FILE"

The result is:

ci
CommonExecutablePath
Configuration
DXSDK_DIR
ExcludeRestorePackageImports
USERPROFILE
IntDir
LibraryPath
MSBuildThisFileDirectory
MU_SDK
NETFXKitsDir
NuGetPackageFolders
NuGetPackageRoot
NuGetProjectStyle
NuGetToolVersion
OutDir
PkgMicrosoft_CodeAnalysis_Analyzers
PkgMicrosoft_VisualStudio_Threading_Analyzers
PkgStyleCop_Analyzers_Unstable
Platform
ProjectAssetsFile
RestoreSuccess
RestoreTool
SolutionDir
TargetExt
TargetName
UserRootDir
VC_ExecutablePath_x86
VC_IncludePath
VC_LibraryPath_x86
VC_SourcePath
VCTargetsPath
WindowsSDK_IncludePath
WindowsSDK_LibraryPath_x86

I which this is correctly.

from mumain.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.