chore: upgrade version to `0.10.1` (#949)

pull/950/head
boojack 2 years ago committed by GitHub
parent 4cfd000b92
commit 677750ef51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,15 +4,13 @@ WORKDIR /frontend-build
COPY ./web/ .
RUN yarn
RUN yarn build
RUN yarn && yarn build
# Build backend exec file.
FROM golang:1.19.3-alpine3.16 AS backend
WORKDIR /backend-build
RUN apk update
RUN apk --no-cache add gcc musl-dev
RUN apk update && apk add --no-cache gcc musl-dev
COPY . .
COPY --from=frontend /frontend-build/dist ./server/dist

@ -27,7 +27,7 @@ func (s *Server) registerMetricCollector() {
mc := &MetricCollector{
collector: c,
ID: s.ID,
Enabled: true,
Enabled: false,
Profile: s.Profile,
}
s.Collector = mc

@ -268,8 +268,8 @@ func (s *Server) registerResourcePublicRoutes(g *echo.Group) {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to fetch resource ID: %v", resourceID)).SetInternal(err)
}
resourceType := resource.Type
if strings.HasPrefix(resource.Type, "text") || strings.HasPrefix(resource.Type, "application") {
resourceType := strings.ToLower(resource.Type)
if strings.HasPrefix(resourceType, "text") || strings.HasPrefix(resourceType, "application") {
resourceType = echo.MIMETextPlain
}
c.Response().Writer.Header().Set(echo.HeaderCacheControl, "max-age=31536000, immutable")

@ -9,10 +9,10 @@ import (
// Version is the service current released version.
// Semantic versioning: https://semver.org/
var Version = "0.10.0"
var Version = "0.10.1"
// DevVersion is the service current development version.
var DevVersion = "0.10.0"
var DevVersion = "0.10.1"
func GetCurrentVersion(mode string) string {
if mode == "dev" {

@ -73,13 +73,15 @@ func (db *DB) Open(ctx context.Context) (err error) {
return fmt.Errorf("failed to find migration history, err: %w", err)
}
if len(migrationHistoryList) == 0 {
if _, err = db.UpsertMigrationHistory(ctx, &MigrationHistoryUpsert{
_, err := db.UpsertMigrationHistory(ctx, &MigrationHistoryUpsert{
Version: currentVersion,
}); err != nil {
})
if err != nil {
return fmt.Errorf("failed to upsert migration history, err: %w", err)
}
return nil
}
migrationHistoryVersionList := []string{}
for _, migrationHistory := range migrationHistoryList {
migrationHistoryVersionList = append(migrationHistoryVersionList, migrationHistory.Version)

Loading…
Cancel
Save