Check-in [fa63935206]
Overview
Comment:Updated to support uploading the binaries to fossil
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fa63935206cad5ec403827692a7f09292ee70179
User & Date: rkeene on 2020-04-01 17:40:10
Other Links: manifest | tags
Context
2020-04-01
17:41
Filed 1.22 check-in: 77bfc6eaca user: rkeene tags: trunk, 1.22
17:40
Updated to support uploading the binaries to fossil check-in: fa63935206 user: rkeene tags: trunk
2020-03-31
18:50
Ensure wiki update happens on the correct directory check-in: f901bb8bfd user: rkeene tags: trunk
Changes

Modified build/build-precompiled from [46b4f35d88] to [e5e03bff2f].

1

















2
3
4
5
6
7
8
#! /usr/bin/env bash


















# Ensure we are in the correct working directory
cd "$(dirname "$(which "$0")")/.." || exit 1

# Determine the version of Filed
version=''
eval "$(( grep '^# *define  *FILED_VERSION' filed.c; echo '|version=FILED_VERSION' ) | cpp -E | grep '^|' | sed 's@^|@@')"

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /usr/bin/env bash

upload='false'
for arg in "$@"; do
	case "${arg}" in
		--help)
			echo "Usage: build-precompiled [--upload]"
			exit 0
			;;
		--upload)
			upload='true'
			;;
		*)
			echo "Invalid argument \"${arg}\"" >&2
			exit 1
			;;
	esac
done

# Ensure we are in the correct working directory
cd "$(dirname "$(which "$0")")/.." || exit 1

# Determine the version of Filed
version=''
eval "$(( grep '^# *define  *FILED_VERSION' filed.c; echo '|version=FILED_VERSION' ) | cpp -E | grep '^|' | sed 's@^|@@')"
50
51
52
53
54
55
56

57
58
59


60






61
62
63
64
65
done

# Wait for that to get done
wait

# Rename the files into place
mkdir -p compiled

for binary in workdir-buildPrecompiled-*/filed; do
	platform="$(echo "${binary}" | sed 's@^.*-platform-@@;s@/.*$@@')"
	mv "${binary}" "compiled/filed-${version}-${platform}"


done







# Cleanup
rm -rf workdir-buildPrecompiled-*

exit 0







>


|
>
>

>
>
>
>
>
>





67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
done

# Wait for that to get done
wait

# Rename the files into place
mkdir -p compiled
binaries=()
for binary in workdir-buildPrecompiled-*/filed; do
	platform="$(echo "${binary}" | sed 's@^.*-platform-@@;s@/.*$@@')"
	binary_dest="compiled/filed-${version}-${platform}"
	mv "${binary}" "${binary_dest}"
	binaries+=("${binary_dest}")
done

if [ "${upload}" = 'true' ]; then
	for binary in "${binaries[@]}"; do
		fossil uv add "${binary}" --as "releases/${version}/$(basename "${binary}")"
	done
fi

# Cleanup
rm -rf workdir-buildPrecompiled-*

exit 0