Skip to content

Commit f1b4c58

Browse files
committed
Makes monochrome flag to lower case; adds 32 bit binaries
1 parent 1732266 commit f1b4c58

File tree

3 files changed

+29
-23
lines changed

3 files changed

+29
-23
lines changed

CHANGELOG.mkd

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.2.9
4+
- Adds colorized ungron output (thanks @nwidger!)
5+
- Adds 32 bit binaries to releases
6+
37
## 0.2.8
48
- Adds freebsd release binaries
59

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func init() {
3131

3232
h += "Options:\n"
3333
h += " -u, --ungron Reverse the operation (turn assignments back into JSON)\n"
34-
h += " -M, --monochrome Monochrome (don't colorize JSON)\n\n"
34+
h += " -m, --monochrome Monochrome (don't colorize JSON)\n\n"
3535

3636
h += "Exit Codes:\n"
3737
h += fmt.Sprintf(" %d\t%s\n", exitOK, "OK")
@@ -62,7 +62,7 @@ func main() {
6262
flag.BoolVar(&ungronFlag, "ungron", false, "Turn statements into JSON instead")
6363
flag.BoolVar(&ungronFlag, "u", false, "Turn statements into JSON instead")
6464
flag.BoolVar(&monochromeFlag, "monochrome", false, "Monochrome (don't colorize JSON)")
65-
flag.BoolVar(&monochromeFlag, "M", false, "Monochrome (don't colorize JSON)")
65+
flag.BoolVar(&monochromeFlag, "m", false, "Monochrome (don't colorize JSON)")
6666

6767
flag.Parse()
6868

script/release

+23-21
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,33 @@ if [ $? -ne 0 ]; then
4141
fi
4242

4343

44-
for OS in "darwin" "linux" "windows" "freebsd"; do
44+
for ARCH in "amd64" "386"; do
45+
for OS in "darwin" "linux" "windows" "freebsd"; do
4546

46-
BINFILE="${BINARY}"
47+
BINFILE="${BINARY}"
4748

48-
if [[ "${OS}" == "windows" ]]; then
49-
BINFILE="${BINFILE}.exe"
50-
fi
49+
if [[ "${OS}" == "windows" ]]; then
50+
BINFILE="${BINFILE}.exe"
51+
fi
5152

52-
rm -f ${BINFILE}
53+
rm -f ${BINFILE}
5354

54-
GOOS=${OS} GOARCH=amd64 go build github.com/${USER}/${REPO}
55+
GOOS=${OS} GOARCH=${ARCH} go build github.com/${USER}/${REPO}
5556

56-
if [[ "${OS}" == "windows" ]]; then
57-
ARCHIVE="${BINARY}-${OS}-amd64-${VERSION}.zip"
58-
zip ${ARCHIVE} ${BINFILE}
59-
else
60-
ARCHIVE="${BINARY}-${OS}-amd64-${VERSION}.tgz"
61-
tar --create --gzip --file=${ARCHIVE} ${BINFILE}
62-
fi
57+
if [[ "${OS}" == "windows" ]]; then
58+
ARCHIVE="${BINARY}-${OS}-${ARCH}-${VERSION}.zip"
59+
zip ${ARCHIVE} ${BINFILE}
60+
else
61+
ARCHIVE="${BINARY}-${OS}-${ARCH}-${VERSION}.tgz"
62+
tar --create --gzip --file=${ARCHIVE} ${BINFILE}
63+
fi
6364

64-
echo "Uploading ${ARCHIVE}..."
65-
github-release upload \
66-
--user ${USER} \
67-
--repo ${REPO} \
68-
--tag ${TAG} \
69-
--name "${ARCHIVE}" \
70-
--file ${PROJDIR}/${ARCHIVE}
65+
echo "Uploading ${ARCHIVE}..."
66+
github-release upload \
67+
--user ${USER} \
68+
--repo ${REPO} \
69+
--tag ${TAG} \
70+
--name "${ARCHIVE}" \
71+
--file ${PROJDIR}/${ARCHIVE}
72+
done
7173
done

0 commit comments

Comments
 (0)