version.go

This commit is contained in:
Kusakabe Si 2021-12-27 10:21:34 +00:00
parent acb750ea5e
commit e69d6cc5aa
3 changed files with 15 additions and 7 deletions

View File

@ -4,6 +4,7 @@ on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
x86_64:
@ -28,6 +29,16 @@ jobs:
run: |
make all static vpp
- name: Commit & Push version.go
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
force: true
author_email: si@kskb.eu.org
author_name: KusakabeSi
message: update version.go
- uses: actions/upload-artifact@v2
with:
name: etherguard-x86_64

View File

@ -12,8 +12,7 @@ generate-version-and-build:
tag="$$(git describe 2>/dev/null)" && \
ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
echo "$$ver" > version.go && \
git update-index --assume-unchanged version.go || true
echo "$$ver" > version.go || true
@$(MAKE) etherguard-go
etherguard-go: $(wildcard *.go) $(wildcard */*.go)
@ -33,8 +32,7 @@ vpp:
tag="$$(git describe 2>/dev/null)" && \
ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
echo "$$ver" > version.go && \
git update-index --assume-unchanged version.go || true
echo "$$ver" > version.go || true
@$(MAKE) etherguard-go-vpp
etherguard-go-vpp: export CGO_CFLAGS ?= -I/usr/include/memif
@ -50,8 +48,7 @@ static:
tag="$$(git describe 2>/dev/null)" && \
ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
echo "$$ver" > version.go && \
git update-index --assume-unchanged version.go || true
echo "$$ver" > version.go || true
@$(MAKE) etherguard-go-static
install: etherguard-go

View File

@ -1,3 +1,3 @@
package main
const Version = "0.0.20210424"
const Version = "v0.3.4"