mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 10:19:35 +00:00
Makefile: Add release tarball target
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -26,6 +26,7 @@ _testmain.go
|
||||
*.test
|
||||
*.prof
|
||||
|
||||
_output/
|
||||
bin/
|
||||
assets/
|
||||
*.aci
|
||||
|
||||
16
Makefile
16
Makefile
@@ -22,4 +22,18 @@ uninstall:
|
||||
rm $(BIN_DIR)/bootcfg
|
||||
rm $(BIN_DIR)/bootcmd
|
||||
|
||||
.PHONY: build test install
|
||||
release: clean _output/coreos-baremetal-linux-amd64.tar.gz
|
||||
|
||||
_output/coreos-baremetal-%-amd64/bootcfg: build
|
||||
@mkdir -p $(dir $@)
|
||||
./scripts/release-files $(dir $@)
|
||||
|
||||
_output/coreos-baremetal-%-amd64.tar.gz: _output/coreos-baremetal-%-amd64/bootcfg
|
||||
tar zcvf $@ -C _output coreos-baremetal-$*-amd64
|
||||
|
||||
clean:
|
||||
rm -rf _output
|
||||
|
||||
.PHONY: build clean install test
|
||||
|
||||
.SECONDARY: _output/coreos-baremetal-linux-amd64/bootcfg
|
||||
|
||||
29
scripts/release-files
Executable file
29
scripts/release-files
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash -e
|
||||
# USAGE: ./release-files DEST
|
||||
|
||||
DEST=$1
|
||||
|
||||
if [ -z "${DEST}" ]; then
|
||||
echo "Usage: ${0} DEST"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
SCRIPTS=$DEST/scripts
|
||||
CONTRIB=$DEST/contrib
|
||||
|
||||
# binaries
|
||||
mkdir -p $DEST
|
||||
cp bin/bootcfg $DEST/bootcfg
|
||||
cp bin/bootcmd $DEST/bootcmd
|
||||
|
||||
# scripts
|
||||
mkdir -p $SCRIPTS/tls
|
||||
cp scripts/get-coreos $SCRIPTS
|
||||
|
||||
cp examples/etc/bootcfg/README.md $SCRIPTS/tls
|
||||
cp examples/etc/bootcfg/cert-gen $SCRIPTS/tls
|
||||
cp examples/etc/bootcfg/openssl.conf $SCRIPTS/tls
|
||||
|
||||
# systemd
|
||||
mkdir -p $CONTRIB/systemd
|
||||
cp contrib/systemd/bootcfg.service $CONTRIB/systemd
|
||||
Reference in New Issue
Block a user