Skip to content

Commit

Permalink
scripts/release.sh: fix minio object browser for compiled gateway
Browse files Browse the repository at this point in the history
minio expects cmd.Version to be a properly formatted RFC 3339 or
ISO 8601 date/time string. The default is "DEVELOPMENT.GOGET"
which results in failures logging into the minio object browser.

Closes #52

Change-Id: I979d7bfce2c301d1ee926112448b72aaf9cb9d75
  • Loading branch information
halkyon committed Feb 11, 2022
1 parent 4ef71b0 commit 59bec26
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion scripts/release.sh
Expand Up @@ -32,9 +32,22 @@ if [[ -v RELEASE_BUILD_REQUIRED ]] && $RELEASE_BUILD_REQUIRED && ! $RELEASE; the
exit 1
fi

# minio needs an RFC 3339 or ISO 8601 formatted date/time set as the version
# otherwise the object browser breaks and refuses login.
# see https://github.com/storj/minio/blob/main/buildscripts/gen-ldflags.go
# for now, these are hardcoded as storj/minio isn't updated that often.
MINIO_VERSION="2022-02-07T12:27:53+00:00"
MINIO_RELEASE="v0.0.0-20220207122753-7689b5c00c37"
MINIO_COMMIT="7689b5c00c372c8fbed43eb5c12a89ddca9aaa5e"
MINIO_SHORT_COMMIT="7689b5c00c37"

echo Running "go $@"
exec go "$1" -ldflags \
"-s -w -X storj.io/private/version.buildTimestamp=$TIMESTAMP
-X storj.io/private/version.buildCommitHash=$COMMIT
-X storj.io/private/version.buildVersion=$VERSION
-X storj.io/private/version.buildRelease=$RELEASE" "${@:2}"
-X storj.io/private/version.buildRelease=$RELEASE
-X storj.io/minio/cmd.Version=$MINIO_VERSION
-X storj.io/minio/cmd.ReleaseTag=$MINIO_RELEASE
-X storj.io/minio/cmd.CommitID=$MINIO_COMMIT
-X storj.io/minio/cmd.ShortCommitID=$MINIO_SHORT_COMMIT" "${@:2}"

0 comments on commit 59bec26

Please sign in to comment.