Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Aug 30, 2023
1 parent 71dc2e0 commit 8794d22
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ CHANGELOG.md
dist
commitlog
lab
api_urls.json
api_urls.json
bin
21 changes: 7 additions & 14 deletions docs/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,10 @@

#### Downloads

[commitlog-v2.0.2-darwin-amd64.tar.gz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-darwin-amd64.tar.gz)
[commitlog-v2.0.2-darwin-amd64.tar.gz.md5](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-darwin-amd64.tar.gz.md5)
[commitlog-v2.0.2-darwin-arm64.tar.gz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-darwin-arm64.tar.gz)
[commitlog-v2.0.2-darwin-arm64.tar.gz.md5](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-darwin-arm64.tar.gz.md5)
[commitlog-v2.0.2-linux-386.tar.gz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-linux-386.tar.gz)
[commitlog-v2.0.2-linux-386.tar.gz.md5](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-linux-386.tar.gz.md5)
[commitlog-v2.0.2-linux-amd64.tar.gz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-linux-amd64.tar.gz)
[commitlog-v2.0.2-linux-amd64.tar.gz.md5](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-linux-amd64.tar.gz.md5)
[commitlog-v2.0.2-linux-arm64.tar.gz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-linux-arm64.tar.gz)
[commitlog-v2.0.2-linux-arm64.tar.gz.md5](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-linux-arm64.tar.gz.md5)
[commitlog-v2.0.2-windows-386.zip](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-windows-386.zip)
[commitlog-v2.0.2-windows-386.zip.md5](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-windows-386.zip.md5)
[commitlog-v2.0.2-windows-amd64.zip](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-windows-amd64.zip)
[commitlog-v2.0.2-windows-amd64.zip.md5](https://github.com/barelyhuman/commitlog/releases/download/v2.0.2/commitlog-v2.0.2-windows-amd64.zip.md5)
[darwin-amd64.tgz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.4/darwin-amd64.tgz)
[darwin-arm64.tgz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.4/darwin-arm64.tgz)
[linux-amd64.tgz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.4/linux-amd64.tgz)
[linux-arm.tgz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.4/linux-arm.tgz)
[linux-arm64.tgz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.4/linux-arm64.tgz)
[windows-386.tgz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.4/windows-386.tgz)
[windows-amd64.tgz](https://github.com/barelyhuman/commitlog/releases/download/v2.0.4/windows-amd64.tgz)
39 changes: 39 additions & 0 deletions scripts/cross-compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

set -euxo pipefail

rm -rf ./bin

build_commands=('
apk add make curl git \
; GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o bin/linux-arm64/alvu \
; GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/linux-amd64/alvu \
; GOOS=linux GOARCH=arm go build -ldflags="-s -w" -o bin/linux-arm/alvu \
; GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o bin/windows-386/alvu \
; GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o bin/windows-amd64/alvu \
; GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o bin/darwin-amd64/alvu \
; GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o bin/darwin-arm64/alvu
')

# run a docker container with osxcross and cross compile everything
docker run -it --rm -v $(pwd):/usr/local/src -w /usr/local/src \
golang:alpine3.16 \
sh -c "$build_commands"

# create archives
cd bin
for dir in $(ls -d *);
do
cp ../README.md $dir
cp ../LICENSE $dir
mkdir -p $dir/docs
cp -r ../docs/* $dir/docs

# remove the download document and styles
rm -rf $dir/docs/download.md
rm -rf $dir/docs/styles.css

tar cfzv "$dir".tgz $dir
rm -rf $dir
done
cd ..

0 comments on commit 8794d22

Please sign in to comment.