Skip to content

Commit a08ee75

Browse files
committed
Adjust location of repo build bins to distinguish repo bin artifacts
1 parent a5a9f26 commit a08ee75

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.cache
2+
/.bin
23
/bin
34
/dist
45
*.swp

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ rebase:
1515
CHARTS_BUILD_SCRIPTS_TARGETS := prepare patch clean clean-cache charts list index unzip zip standardize template
1616

1717
$(CHARTS_BUILD_SCRIPTS_TARGETS): pull-scripts
18-
@./bin/charts-build-scripts $@
18+
@./.bin/charts-build-scripts $@
1919

2020
.PHONY: $(TARGETS) $(CHARTS_BUILD_SCRIPTS_TARGETS)

scripts/pull-scripts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ cd $(dirname $0)
55

66
source ./version
77

8-
if ls ../bin/charts-build-scripts 1>/dev/null 2>/dev/null; then
9-
CURRENT_SCRIPT_VERSION=$(../bin/charts-build-scripts --version | cut -d' ' -f3)
8+
if ls ../.bin/charts-build-scripts 1>/dev/null 2>/dev/null; then
9+
CURRENT_SCRIPT_VERSION=$(../.bin/charts-build-scripts --version | cut -d' ' -f3)
1010
if [[ "${CURRENT_SCRIPT_VERSION}" == "${CHARTS_BUILD_SCRIPT_VERSION}" ]]; then
1111
exit 0
1212
fi
1313
fi
1414

1515
echo "Downloading charts-build-scripts version ${CHARTS_BUILD_SCRIPTS_REPO}@${CHARTS_BUILD_SCRIPT_VERSION}"
1616

17-
rm -rf ../bin
17+
rm -rf ../.bin
1818
cd ..
1919

20-
mkdir -p bin
20+
mkdir -p .bin
2121
OS=$(go version | cut -d' ' -f4 | cut -d'/' -f1)
2222
ARCH=$(go version | cut -d' ' -f4 | cut -d'/' -f2)
2323

@@ -26,28 +26,28 @@ if [[ "$OS" == "windows" ]]; then
2626
else
2727
BINARY_NAME="charts-build-scripts_${OS}_${ARCH}"
2828
fi
29-
curl -s -L ${CHARTS_BUILD_SCRIPTS_REPO%.git}/releases/download/${CHARTS_BUILD_SCRIPT_VERSION}/${BINARY_NAME} --output bin/charts-build-scripts
29+
curl -s -L ${CHARTS_BUILD_SCRIPTS_REPO%.git}/releases/download/${CHARTS_BUILD_SCRIPT_VERSION}/${BINARY_NAME} --output .bin/charts-build-scripts
3030

3131
# Fall back to binary name format from old release scheme
32-
if ! [[ -f bin/charts-build-scripts ]] || [[ $(cat bin/charts-build-scripts) == "Not Found" ]]; then
32+
if ! [[ -f .bin/charts-build-scripts ]] || [[ $(cat .bin/charts-build-scripts) == "Not Found" ]]; then
3333
echo "Falling back to old binary name format..."
34-
rm bin/charts-build-scripts;
34+
rm .bin/charts-build-scripts;
3535
if [[ ${OS} == "linux" ]]; then
3636
BINARY_NAME=charts-build-scripts
3737
else
3838
BINARY_NAME=charts-build-scripts-${OS}
3939
fi
40-
curl -s -L ${CHARTS_BUILD_SCRIPTS_REPO%.git}/releases/download/${CHARTS_BUILD_SCRIPT_VERSION}/${BINARY_NAME} --output bin/charts-build-scripts
40+
curl -s -L ${CHARTS_BUILD_SCRIPTS_REPO%.git}/releases/download/${CHARTS_BUILD_SCRIPT_VERSION}/${BINARY_NAME} --output .bin/charts-build-scripts
4141
fi
4242

4343
# If falling back to old binary name format did not work, fail
44-
if ! [[ -f bin/charts-build-scripts ]] || [[ $(cat bin/charts-build-scripts) == "Not Found" ]]; then
44+
if ! [[ -f .bin/charts-build-scripts ]] || [[ $(cat .bin/charts-build-scripts) == "Not Found" ]]; then
4545
echo "Failed to find charts-build-scripts binary"
46-
rm bin/charts-build-scripts;
46+
rm .bin/charts-build-scripts;
4747
exit 1
4848
fi
4949

50-
echo "${BINARY_NAME} => ./bin/charts-build-scripts"
50+
echo "${BINARY_NAME} => ./.bin/charts-build-scripts"
5151

52-
chmod +x ./bin/charts-build-scripts
53-
./bin/charts-build-scripts --version
52+
chmod +x ./.bin/charts-build-scripts
53+
./.bin/charts-build-scripts --version

scripts/validate-charts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ cd $(dirname $0)/..
66
echo Running chart validation
77

88
./scripts/pull-scripts
9-
./bin/charts-build-scripts validate --local
9+
./.bin/charts-build-scripts validate --local

0 commit comments

Comments
 (0)