Skip to content

Commit 32bffcf

Browse files
committed
Revert "release script: Download fbc sources tarball instead of doing "git clone""
This reverts commit 3fc7d3a. The problem is that line endings are all LF even in the .zip download from Github. But we want CRLF line endings in the dos/win32 packages, so we have to do a git checkout manually. Conflicts: contrib/release/build.sh
1 parent 1943a02 commit 32bffcf

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

contrib/release/build.sh

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# - Downloaded archives are cached in the input/ dir
88
# - Output packages & manifests are put in the output/ dir
99
# - Toolchain source packages are downloaded too
10-
# - fbc sources are retrieved from Git; you can specify the exact commit to
11-
# build, the default is "master".
10+
# - fbc sources are retrieved from Git; you have to specify the exact commit
11+
# to build (or a tag/branch name).
1212
#
1313
# The standalone fbc is built in the same directory as the normal fbc, by just
1414
# rebuilding src/compiler/obj/fbc.o (that's all that's affected by
@@ -79,6 +79,19 @@ mkdir -p input
7979
mkdir -p output
8080
rm -rf build
8181
mkdir build
82+
83+
echo "updating input/fbc repo"
84+
cd input
85+
if [ ! -d fbc ]; then
86+
git clone https://github.com/freebasic/fbc.git
87+
fi
88+
cd fbc
89+
git fetch
90+
git fetch --tags
91+
git remote prune origin
92+
git reset --hard origin/master
93+
cd ../..
94+
8295
cd build
8396

8497
buildinfo=../output/buildinfo-$target.txt
@@ -208,13 +221,6 @@ win64)
208221
;;
209222
esac
210223

211-
get_fbc_sources() {
212-
# fbc sources
213-
download fbc-$fbccommit.tar.gz https://github.com/freebasic/fbc/archive/$fbccommit.tar.gz
214-
tar xf ../input/fbc-$fbccommit.tar.gz
215-
mv fbc-$fbccommit fbc
216-
}
217-
218224
bootfb_title=FreeBASIC-1.02.1-$fbtarget
219225

220226
case $fbtarget in
@@ -227,7 +233,9 @@ linux*)
227233
download $bootfb_package "https://downloads.sourceforge.net/fbc/${bootfb_package}?download"
228234
tar xf ../input/$bootfb_package
229235

230-
get_fbc_sources
236+
# fbc sources
237+
cp -R ../input/fbc .
238+
cd fbc && git reset --hard "$fbccommit" && cd ..
231239

232240
mkdir tempinstall
233241
;;
@@ -237,7 +245,9 @@ linux*)
237245
download $bootfb_package "https://downloads.sourceforge.net/fbc/${bootfb_package}?download"
238246
unzip -q ../input/$bootfb_package
239247

240-
get_fbc_sources
248+
# fbc sources
249+
cp -R ../input/fbc fbc
250+
cd fbc && git reset --hard "$fbccommit" && cd ..
241251
echo "prefix := `pwd -W`" > fbc/config.mk
242252

243253
# On 64bit, we have to override the FB makefile's uname check, because MSYS uname reports 32bit still

0 commit comments

Comments
 (0)