mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: upgrade version to 0.10.1
(#949)
This commit is contained in:
@@ -4,15 +4,13 @@ WORKDIR /frontend-build
|
|||||||
|
|
||||||
COPY ./web/ .
|
COPY ./web/ .
|
||||||
|
|
||||||
RUN yarn
|
RUN yarn && yarn build
|
||||||
RUN yarn build
|
|
||||||
|
|
||||||
# Build backend exec file.
|
# Build backend exec file.
|
||||||
FROM golang:1.19.3-alpine3.16 AS backend
|
FROM golang:1.19.3-alpine3.16 AS backend
|
||||||
WORKDIR /backend-build
|
WORKDIR /backend-build
|
||||||
|
|
||||||
RUN apk update
|
RUN apk update && apk add --no-cache gcc musl-dev
|
||||||
RUN apk --no-cache add gcc musl-dev
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=frontend /frontend-build/dist ./server/dist
|
COPY --from=frontend /frontend-build/dist ./server/dist
|
||||||
|
@@ -27,7 +27,7 @@ func (s *Server) registerMetricCollector() {
|
|||||||
mc := &MetricCollector{
|
mc := &MetricCollector{
|
||||||
collector: c,
|
collector: c,
|
||||||
ID: s.ID,
|
ID: s.ID,
|
||||||
Enabled: true,
|
Enabled: false,
|
||||||
Profile: s.Profile,
|
Profile: s.Profile,
|
||||||
}
|
}
|
||||||
s.Collector = mc
|
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)
|
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to fetch resource ID: %v", resourceID)).SetInternal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceType := resource.Type
|
resourceType := strings.ToLower(resource.Type)
|
||||||
if strings.HasPrefix(resource.Type, "text") || strings.HasPrefix(resource.Type, "application") {
|
if strings.HasPrefix(resourceType, "text") || strings.HasPrefix(resourceType, "application") {
|
||||||
resourceType = echo.MIMETextPlain
|
resourceType = echo.MIMETextPlain
|
||||||
}
|
}
|
||||||
c.Response().Writer.Header().Set(echo.HeaderCacheControl, "max-age=31536000, immutable")
|
c.Response().Writer.Header().Set(echo.HeaderCacheControl, "max-age=31536000, immutable")
|
||||||
|
@@ -9,10 +9,10 @@ import (
|
|||||||
|
|
||||||
// Version is the service current released version.
|
// Version is the service current released version.
|
||||||
// Semantic versioning: https://semver.org/
|
// Semantic versioning: https://semver.org/
|
||||||
var Version = "0.10.0"
|
var Version = "0.10.1"
|
||||||
|
|
||||||
// DevVersion is the service current development version.
|
// DevVersion is the service current development version.
|
||||||
var DevVersion = "0.10.0"
|
var DevVersion = "0.10.1"
|
||||||
|
|
||||||
func GetCurrentVersion(mode string) string {
|
func GetCurrentVersion(mode string) string {
|
||||||
if mode == "dev" {
|
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)
|
return fmt.Errorf("failed to find migration history, err: %w", err)
|
||||||
}
|
}
|
||||||
if len(migrationHistoryList) == 0 {
|
if len(migrationHistoryList) == 0 {
|
||||||
if _, err = db.UpsertMigrationHistory(ctx, &MigrationHistoryUpsert{
|
_, err := db.UpsertMigrationHistory(ctx, &MigrationHistoryUpsert{
|
||||||
Version: currentVersion,
|
Version: currentVersion,
|
||||||
}); err != nil {
|
})
|
||||||
|
if err != nil {
|
||||||
return fmt.Errorf("failed to upsert migration history, err: %w", err)
|
return fmt.Errorf("failed to upsert migration history, err: %w", err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
migrationHistoryVersionList := []string{}
|
migrationHistoryVersionList := []string{}
|
||||||
for _, migrationHistory := range migrationHistoryList {
|
for _, migrationHistory := range migrationHistoryList {
|
||||||
migrationHistoryVersionList = append(migrationHistoryVersionList, migrationHistory.Version)
|
migrationHistoryVersionList = append(migrationHistoryVersionList, migrationHistory.Version)
|
||||||
|
Reference in New Issue
Block a user