Rename build_redist to extract_binaries

This is a clearer name for the task that happens in the script

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2022-08-22 17:59:39 +01:00
parent fcf50cef7b
commit 4fe2b3fa24
5 changed files with 23 additions and 19 deletions

View File

@@ -85,7 +85,7 @@ jobs:
openfaas/faas-cli:${{ steps.get_tag.outputs.TAG }}
-
name: Copy binaries to host
run: ./build_redist.sh ${{ steps.get_tag.outputs.TAG }}
run: ./extract_binaries.sh ${{ steps.get_tag.outputs.TAG }}
-
name: Create SHA of binaries
run: cd bin && ../ci/hashgen.sh && cd ../

View File

@@ -53,7 +53,7 @@ $ make local-install
To build the release binaries type in:
```
./build_redist.sh
./extract_binaries.sh
```
This creates the faas-cli for Mac, Windows, Linux x64, Linux ARMHF and Linux ARM64.

View File

@@ -16,7 +16,7 @@ build:
.PHONY: build_redist
build_redist:
./build_redist.sh
./extract_binaries.sh
.PHONY: build_samples
build_samples:

View File

@@ -1,16 +0,0 @@
#!/bin/sh
export eTAG="latest-dev"
echo $1
if [ $1 ] ; then
eTAG=$1
fi
docker create --name faas-cli openfaas/faas-cli:${eTAG} && \
mkdir -p ./bin && \
docker cp faas-cli:/home/app/faas-cli ./bin && \
docker cp faas-cli:/home/app/faas-cli-darwin ./bin && \
docker cp faas-cli:/home/app/faas-cli-armhf ./bin && \
docker cp faas-cli:/home/app/faas-cli-arm64 ./bin && \
docker cp faas-cli:/home/app/faas-cli.exe ./bin && \
docker rm -f faas-cli

20
extract_binaries.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
export eTAG="latest-dev"
echo $1
if [ $1 ] ; then
eTAG=$1
fi
# This file extracts the contents of the openfaas/faas-cli:${eTAG} image
# to the bin folder.
# Run ./build.sh first to create the image itself with the various
# binaries within it.
docker create --name faas-cli openfaas/faas-cli:${eTAG} && \
mkdir -p ./bin && \
docker cp faas-cli:/home/app/faas-cli ./bin && \
docker cp faas-cli:/home/app/faas-cli-darwin ./bin && \
docker cp faas-cli:/home/app/faas-cli-armhf ./bin && \
docker cp faas-cli:/home/app/faas-cli-arm64 ./bin && \
docker cp faas-cli:/home/app/faas-cli.exe ./bin && \
docker rm -f faas-cli