File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change 13
13
14
14
lastTag = "0.13.2" ;
15
15
16
- # Add the commit to the version string, in case someone builds from main
17
- getVersion = pkgs . lib . trivial . pipe self [
18
- ( x : "${ lastTag } " )
19
- ( x : if ( self ? shortRev )
20
- then "${ x } -${ self . shortRev } "
21
- else "${ x } -${ self . dirtyShortRev or "dirty" } " )
22
- ] ;
16
+ revision = if ( self ? shortRev )
17
+ then "${ self . shortRev } "
18
+ else "${ self . dirtyShortRev or "dirty" } " ;
23
19
24
- # Run `devbox run update-flake` to update the vendorHash
20
+ # Add the commit to the version string for flake builds
21
+ version = "${ lastTag } -${ revision } " ;
22
+
23
+ # Run `devbox run update-flake` to update the vendor-hash
25
24
vendorHash = if builtins . pathExists ./vendor-hash
26
25
then builtins . readFile ./vendor-hash
27
26
else "" ;
31
30
in
32
31
{
33
32
inherit self ;
34
- packages . default = buildGoModule rec {
33
+ packages . default = buildGoModule {
35
34
pname = "devbox" ;
36
- version = getVersion ;
35
+ inherit version vendorHash ;
37
36
38
37
src = ./. ;
39
38
40
- inherit vendorHash ;
41
-
42
39
ldflags = [
43
40
"-s"
44
41
"-w"
45
42
"-X go.jetpack.io/devbox/internal/build.Version=${ version } "
43
+ "-X go.jetpack.io/devbox/internal/build.Commit=${ revision } "
46
44
] ;
47
45
48
46
# Disable tests if they require network access or are integration tests
You can’t perform that action at this time.
0 commit comments