Skip to content

Commit 41840c9

Browse files
authored
[other] add nix (#1076)
# Pull Request Template ## Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Fixes # (issue) ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit test - [ ] Integration test ## JS Budget Check Please mention the size in kb before abd after this PR | Files | Before | After | | ----------- | ----------- | ----------- | | dist/build.js. | | | | dist/build.min.js| | | ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules - [ ] I have checked my code and corrected any misspellings ## Mentions: List the person or team responsible for reviewing proposed changes. cc @BranchMetrics/saas-sdk-devs for visibility.
1 parent ccc8d89 commit 41840c9

File tree

6 files changed

+95
-3
lines changed

6 files changed

+95
-3
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/workflows/deploy-qa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- README.md
1010
env:
1111
BRANCH_NAME: '${{ github.event.inputs.branch_name || github.head_ref || github.ref_name }}'
12-
NODE_VERSION: 16
12+
NODE_VERSION: 18
1313
JAVA_VERSION: 11
1414
JAVA_DISTRIBUTION: 'adopt'
1515

.github/workflows/gate-keep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Gate Keeping
22
on:
33
push:
44
env:
5-
NODE_VERSION: 16
5+
NODE_VERSION: 18
66
JAVA_VERSION: 11
77
JAVA_DISTRIBUTION: 'adopt'
88

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ dist
3535
dev
3636
.nyc_output
3737
test-results.json
38-
.idea/
38+
.idea/
39+
.direnv/

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
description = "web-branch-deep-linking-attribution flake";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
6+
utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs = { self, nixpkgs, utils }:
10+
utils.lib.eachDefaultSystem (system:
11+
let
12+
pkgs = nixpkgs.legacyPackages.${system};
13+
nodejs = pkgs.nodejs-18_x;
14+
in
15+
{
16+
devShell = pkgs.mkShell {
17+
nativeBuildInputs = [
18+
nodejs
19+
];
20+
shellHook = ''
21+
if [ -f $HOME/.config/bin/setup-webstorm-sdk ] && [ -f ./.idea/workspace.xml ]; then
22+
$HOME/.config/bin/setup-webstorm-sdk || echo "setup-webstorm-sdk failed"
23+
fi
24+
'';
25+
};
26+
formatter = pkgs.nixpkgs-fmt;
27+
}
28+
);
29+
}

0 commit comments

Comments
 (0)