Just eval the file right in the beginning of each config.exs
file. It will load the env of the .env
files every time the project is compiled.
__ENV__.file()
|> Path.dirname()
|> Path.join("../../../config/dotenv.exs")
#!/bin/bash | |
for file in $(git diff --name-only --staged | sort | uniq | grep ".exs\?") | |
do | |
mix format $file | |
git add $file | |
done |
defmodule Bump do | |
def run do | |
patterns = [ | |
{"mix.exs", ~r/@version\s"(?<version>\d+.\d+.\d+)"/, &mix_builder/1}, | |
{"README.md", ~r/{:red_mutex,\s*"~>\s*(?<version>\d+.\d+.\d+)"}/, &readme_builder/1} | |
] | |
type = type() | |
{files, new_version} = patterns |
I hereby claim:
To claim this, I am signing this object:
defmodule App.PhoneNumber do | |
use Ecto.Type | |
defstruct country_code: nil, | |
national_number: nil, | |
extension: nil, | |
italian_leading_zero: nil, | |
number_of_leading_zeros: nil, | |
raw_input: nil, | |
country_code_source: nil, |
title | description | logo |
---|---|---|
Spotify |
Show what you're listening to. |
spotify.png |
import { getNowPlaying } from '../../lib/spotify';
const Sequencer = require('@jest/test-sequencer').default; | |
class CustomSequencer extends Sequencer { | |
sort(tests) { | |
const totalPartitionsEnv = process.env.JEST_TOTAL_PARTITIONS; | |
const partitionEnv = process.env.JEST_PARTITION; | |
if (totalPartitionsEnv && partitionEnv) { | |
const totalPartitions = parseInt(totalPartitionsEnv, 10); | |
const partition = parseInt(partitionEnv, 10); |