Skip to content

Commit 7e8abdb

Browse files
committed
Adds go.mod, newer release script
1 parent 5555984 commit 7e8abdb

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/tomnomnom/httprobe
2+
3+
go 1.18

script/release

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,15 @@ if [ $? -ne 0 ]; then
2626
exit 3
2727
fi
2828

29-
# Check if tag exists
30-
git fetch --tags
31-
git tag | grep "^${TAG}$"
32-
33-
if [ $? -ne 0 ]; then
34-
github-release release \
35-
--user ${USER} \
36-
--repo ${REPO} \
37-
--tag ${TAG} \
38-
--name "${REPO} ${TAG}" \
39-
--description "${TAG}" \
40-
--pre-release
41-
fi
42-
29+
FILELIST=""
4330

4431
for ARCH in "amd64" "386"; do
4532
for OS in "darwin" "linux" "windows" "freebsd"; do
4633

34+
if [[ "${OS}" == "darwin" && "${ARCH}" == "386" ]]; then
35+
continue
36+
fi
37+
4738
BINFILE="${BINARY}"
4839

4940
if [[ "${OS}" == "windows" ]]; then
@@ -57,18 +48,16 @@ for ARCH in "amd64" "386"; do
5748
if [[ "${OS}" == "windows" ]]; then
5849
ARCHIVE="${BINARY}-${OS}-${ARCH}-${VERSION}.zip"
5950
zip ${ARCHIVE} ${BINFILE}
51+
rm ${BINFILE}
6052
else
6153
ARCHIVE="${BINARY}-${OS}-${ARCH}-${VERSION}.tgz"
6254
tar --create --gzip --file=${ARCHIVE} ${BINFILE}
6355
fi
6456

65-
echo "Uploading ${ARCHIVE}..."
66-
github-release upload \
67-
--user ${USER} \
68-
--repo ${REPO} \
69-
--tag ${TAG} \
70-
--name "${ARCHIVE}" \
71-
--file ${PROJDIR}/${ARCHIVE}
57+
FILELIST="${FILELIST} ${PROJDIR}/${ARCHIVE}"
7258
done
7359
done
7460

61+
gh release create ${TAG} ${FILELIST}
62+
rm ${FILELIST}
63+

0 commit comments

Comments
 (0)