Skip to content

Commit 8cb3d80

Browse files
committed
Initial commit
0 parents  commit 8cb3d80

File tree

51 files changed

+2132
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2132
-0
lines changed

.ci/esy-build-steps.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Cross-platform set of build steps for building esy projects
2+
3+
steps:
4+
- task: NodeTool@0
5+
inputs:
6+
versionSpec: '8.9'
7+
- script: npm install -g [email protected]
8+
displayName: 'npm install -g [email protected]'
9+
- script: esy install
10+
displayName: 'esy install'
11+
- script: esy pesy
12+
displayName: 'esy pesy'
13+
- script: esy build
14+
displayName: 'esy build'
15+
- script: esy test
16+
displayName: 'esy test'
17+
- script: esy ls-libs
18+
continueOnError: true
19+
displayName: 'Show all libraries including this package lib'
20+
- script: esy release
21+
displayName: 'Test Creation of Prebuilt Binary Releases'
22+
continueOnError: true
23+
# Cross-platform set of build steps for building esy projects
24+
25+
steps:
26+
- task: NodeTool@0
27+
inputs:
28+
versionSpec: '8.9'
29+
- script: npm install -g [email protected]
30+
displayName: 'npm install -g [email protected]'
31+
- script: esy install
32+
displayName: 'esy install'
33+
- script: esy pesy
34+
displayName: 'esy pesy'
35+
- script: esy build
36+
displayName: 'esy build'
37+
- script: esy test
38+
displayName: 'esy test'
39+
- script: esy ls-libs
40+
continueOnError: true
41+
displayName: 'Show all libraries including this package lib'
42+
- script: esy release
43+
displayName: 'Test Creation of Prebuilt Binary Releases'
44+
continueOnError: true

.ci/publish-build-cache.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Steps for publishing project cache
2+
3+
steps:
4+
- task: PublishBuildArtifacts@1
5+
displayName: 'Cache: Upload install folder'
6+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
7+
inputs:
8+
pathToPublish: '$(ESY__CACHE_INSTALL_PATH)'
9+
artifactName: 'cache-$(Agent.OS)-install'
10+
parallel: true
11+
parallelCount: 8

.ci/restore-build-cache.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Steps for restoring project cache
2+
3+
steps:
4+
- task: DownloadBuildArtifacts@0
5+
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
6+
displayName: 'Cache: Restore install'
7+
inputs:
8+
buildType: 'specific'
9+
project: '$(System.TeamProject)'
10+
pipeline: '$(Build.DefinitionName)'
11+
branchName: 'refs/heads/master'
12+
buildVersionToDownload: 'latestFromBranch'
13+
downloadType: 'single'
14+
artifactName: 'cache-$(Agent.OS)-install'
15+
downloadPath: '$(System.ArtifactsDirectory)'
16+
continueOnError: true
17+
18+
- task: CopyFiles@2
19+
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
20+
inputs:
21+
sourceFolder: '$(System.ArtifactsDirectory)\cache-$(Agent.OS)-install'
22+
targetFolder: '$(ESY__CACHE_INSTALL_PATH)'
23+
continueOnError: true

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
npm-debug.log
2+
.merlin
3+
yarn-error.log
4+
node_modules
5+
node_modules/
6+
_build
7+
_release
8+
_esy/
9+
reenv.install
10+
.DS_Store
11+
*.install

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# reenv
2+
3+
Minimal dotenv-cli implementation in ReasonML.
4+
5+
## Usage
6+
7+
`reenv.exe [dotenv-file] [executable] [...args]`
8+
9+
### example
10+
11+
`reenv.exe .env node index.js`
12+
13+
## Developing:
14+
15+
```
16+
npm install -g esy pesy
17+
git clone <this-repo>
18+
esy install
19+
esy build
20+
```
21+
22+
### Running Binary:
23+
24+
After building the project, you can run the main binary that is produced.
25+
26+
```
27+
esy x reenv.exe
28+
```
29+
30+
### Running Tests:
31+
32+
```
33+
# Runs the "test" command in `package.json`.
34+
esy test
35+
```

azure-pipelines.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Starter pipeline
2+
# Start with a minimal pipeline that you can customize to build and deploy your code.
3+
# Add steps that build, run tests, deploy, and more:
4+
# https://aka.ms/yaml
5+
6+
name: $(Build.SourceVersion)
7+
jobs:
8+
- job: Linux
9+
timeoutInMinutes: 0
10+
pool:
11+
vmImage: 'Ubuntu 16.04'
12+
13+
variables:
14+
ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3_____________________________________________________________________/i/
15+
ESY__CACHE_SOURCE_TARBALL_PATH: /home/vsts/.esy/source/i
16+
17+
steps:
18+
# TODO: Uncomment both this and 'publish-build-cache' below to enable build caching for Linux.
19+
# - template: .ci/restore-build-cache.yml
20+
- template: .ci/esy-build-steps.yml
21+
# - template: .ci/publish-build-cache.yml
22+
23+
- job: MacOS
24+
timeoutInMinutes: 0
25+
pool:
26+
vmImage: 'macOS 10.13'
27+
28+
variables:
29+
ESY__CACHE_INSTALL_PATH: /Users/vsts/.esy/3____________________________________________________________________/i/
30+
ESY__CACHE_SOURCE_TARBALL_PATH: /Users/vsts/.esy/source/i
31+
32+
steps:
33+
# TODO: Uncomment both this and 'publish-build-cache' below to enable build caching for Mac.
34+
# - template: .ci/restore-build-cache.yml
35+
- template: .ci/esy-build-steps.yml
36+
# - template: .ci/publish-build-cache.yml
37+
38+
- job: Windows
39+
timeoutInMinutes: 0
40+
pool:
41+
vmImage: 'vs2017-win2016'
42+
43+
variables:
44+
ESY__CACHE_INSTALL_PATH: C:\Users\VssAdministrator\.esy\3_\i
45+
ESY__CACHE_SOURCE_TARBALL_PATH: C:\Users\VssAdministrator\.esy\source\i
46+
47+
steps:
48+
- template: .ci/restore-build-cache.yml
49+
- template: .ci/esy-build-steps.yml
50+
- template: .ci/publish-build-cache.yml
51+
52+
- job: Release
53+
timeoutInMinutes: 0
54+
displayName: Release
55+
dependsOn:
56+
- Linux
57+
- MacOS
58+
- Windows
59+
condition: succeeded()
60+
pool:
61+
vmImage: ubuntu-16.04
62+
steps:
63+
- task: PublishBuildArtifacts@1
64+
displayName: 'Release Package'
65+
inputs:
66+
PathtoPublish: '.'
67+
ArtifactName: npm-package

dune

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(dirs (:standard \ node_modules \ _esy))

dune-project

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
(lang dune 1.6)
2+
(name reenv)

esy.lock/.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
# Set eol to LF so files aren't converted to CRLF-eol on Windows.
3+
* text eol=lf

esy.lock/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
# Reset any possible .gitignore, we want all esy.lock to be un-ignored.
3+
!*

0 commit comments

Comments
 (0)