Represent the last commit date instead of build date

This commit is contained in:
Berger Eugene 2022-12-25 22:00:50 +02:00
parent 0f168946c7
commit 89254f1dac
5 changed files with 14 additions and 10 deletions

View File

@ -32,7 +32,7 @@ builds:
- -X github.com/f1bonacc1/process-compose/src/config.Version={{.Tag}}
- -X github.com/f1bonacc1/process-compose/src/config.CheckForUpdates=true
- -X github.com/f1bonacc1/process-compose/src/config.Commit={{.ShortCommit}}
- -X github.com/f1bonacc1/process-compose/src/config.Date={{.Date}}
- -X github.com/f1bonacc1/process-compose/src/config.Date={{.CommitDate}}
- -s -w
archives:
- replacements:

View File

@ -2,7 +2,7 @@ NAME=process-compose
RM=rm
VERSION = $(shell git describe --abbrev=0)
GIT_REV ?= $(shell git rev-parse --short HEAD)
DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
DATE ?= $(shell TZ=UTC0 git show --quiet --date='format-local:%Y-%m-%dT%H:%M:%SZ' --format="%cd")
NUMVER = $(shell echo ${VERSION} | cut -d"v" -f 2)
PKG = github.com/f1bonacc1/${NAME}
SHELL := /bin/bash

View File

@ -1,11 +1,13 @@
{ buildGoModule, config, lib, pkgs, installShellFiles, date, commit }:
let pkg = "github.com/f1bonacc1/process-compose/src/config";
in
buildGoModule rec {
pname = "process-compose";
version = "0.29.1";
pkg = "github.com/f1bonacc1/process-compose/src/config";
src = ./.;
src = lib.cleanSource ./.;
ldflags = [
"-X ${pkg}.Version=v${version}"
"-X ${pkg}.Date=${date}"

View File

@ -17,16 +17,18 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1666837999,
"narHash": "sha256-hI7+s1UVDsJNqNn9UGV6xTBGqMC4dqOyVpeDf+su7JU=",
"lastModified": 1671971468,
"narHash": "sha256-dbToieyk3ym62lpO1ZZSPN+az/sBMmP05VAJcbb5PkM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1c6eb4876f71e8903ae9f73e6adf45fdbebc0292",
"rev": "266927206388a73cb3dcfdc9bce73a381e3e1faf",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "NixOS",
"ref": "release-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {

View File

@ -3,7 +3,7 @@
"Process Compose is like docker-compose, but for orchestrating a suite of processes, not containers.";
# Nixpkgs / NixOS version to use.
inputs.nixpkgs.url = "nixpkgs";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }: