BuildMethod: makefile not passing Version parameter
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
### Description:
https://github.com/kaihendry/aws-sam-gateway-example/blob/master/Makefile#L14 does not appear to embed Version set by
VERSION = $(shell git rev-parse --abbrev-ref HEAD)-$(shell git rev-parse --short HEAD)
### Steps to reproduce:
1. git clone https://github.com/kaihendry/aws-sam-gateway-example.git
2. edit Makefile with your AWS PROFILE
3. `make`
### Observed result:
Version appears unset

### Expected result:
go build -ldflags "-X main.Version=foobar" -o foo
PORT=3000 ./foo &
curl -s localhost:3000 | grep Version
Version: foobar
### Additional environment details (Ex: Arch Linux)
1. OS: I use Arch btw
2. If using SAM CLI, SAM CLI, version 1.27.2
3. AWS region: ap-souteast-1
`Add --debug flag to any SAM CLI commands you are running`
```
2021-08-10 10:50:07,209 | Running workflow 'CustomMakeBuilder'
2021-08-10 10:50:07,209 | Running CustomMakeBuilder:CopySource
2021-08-10 10:50:07,217 | CustomMakeBuilder:CopySource succeeded
2021-08-10 10:50:07,217 | Running CustomMakeBuilder:MakeBuild
2021-08-10 10:50:07,217 | Current Artifacts Directory : /home/hendry/tmp/aws-sam-gateway-example/.aws-sam/build/MainFunction
2021-08-10 10:50:07,218 | executing Make: ['make', '--makefile', '/home/hendry/tmp/aws-sam-gateway-example/Makefile', 'build-MainFunction']
2021-08-10 10:50:07,835 | CustomMakeBuilder:MakeBuild succeeded
```
Contributor guide
Assessment
This issue has not been assessed yet.