Skip to content

Commit

Permalink
Release fmcsadmin 2.2.0 (#41)
Browse files Browse the repository at this point in the history
* Update the version string

* Fix spelling in help messages

* Update README.md

* Remove FUNDING.yml

* Add "-i" option to specify a private key file for FileMaker Admin API PKI Authentication

* Update go.yml and release.yml for GitHub Actions to build with Go 1.19

* Update behavior of "GET CWPCONFIG" command and "SET CWPCONFIG" command on Linux

* Drop support for Claris FileMaker Server 19.2

* Release fmcsadmin 2.1.0

* Update the version string

* Update go.mod and go.sum

* Update the version string

* Update README.md and release-notes.txt

* Update go.yml and release.yml for GitHub Actions to build with Go 1.20

* Update README.md

* Drop support for Ubuntu 18.04 LTS

* Update YAML files for GitHub Actions

* Drop support for Windows 10 Version 21H2

* Drop support for Claris FileMaker Server 19.3

* Update comparePath function for testing on Windows

* Add support for Ubuntu 22.04 LTS

* Update go.yml for GitHub Actions

* Add goss.yaml for GitHub Actions

* Update go.yml for GitHub Actions to build Goss on macOS

* Add support for Windows Server 2019 and Windows Server 2022

* Update go.yml for GitHub Actions to build Goss on Windows

* Update go.yml for GitHub Actions to use Goss v0.4.0-rc.3

* Add support for Ubuntu 22.04 LTS on arm64 architecture

* Update go.yml for GitHub Actions to test on arm64 architecture

* Drop support for CentOS Linux 7

* Update go.yml and goss.yaml for testing

* Update goss.yaml for testing on macOS Monterey

* [WIP] Update "GET SERVERPREFS" command to get persistent cache setting for Claris FileMaker Server 2023

* Update "GET SERVERPREFS" command to get persistent cache setting for Claris FileMaker Server 2023 (#33)

* Update go.yml for GitHub Actions to use Goss v0.4.0

* Update the copyright year

* Add support for Claris FileMaker Server 2023 (20.3)

* Drop support for Claris FileMaker Server 19.4

* Modify "GET SERVERPREFS" command to get persistent cache setting for Claris FileMaker Server 2023 (#33)

* Update "GET SERVERPREFS" command to get persistent cache sync setting for Claris FileMaker Server 2023 (#33)

* Update release-notes.txt (#33)

* Drop support for macOS Big Sur 11 (#32)

* Add support for macOS Sonoma 14 (#32)

* Modify behavior of outputting error messages for invalid parameters when using "GET SERVERPREFS" and "SET SERVERPREFS" command

* Remove unnecessary codes (#33)

* Update "GET SERVERCONFIG" command and "GET SERVERPREFS" command due to increasing the maximum number of hosted database files per FileMaker Server instance (#34)

* Update "SET SERVERCONFIG" command and "SET SERVERPREFS" command due to increasing the maximum number of hosted database files per FileMaker Server instance (#35)

* Update README.md for Claris FileMaker Server 2023

* Update go.yml and release.yml for GitHub Actions to build with Go 1.21 (#32)

* Update go.mod and go.sum (#32)

* Modify go.yml and release.yml for GitHub Actions (#32)

* Add support for macOS Sonoma 14 (#32)

* Update actions/checkout action to v4.1.1

* Update docker/setup-qemu-action action to v3.0.0

* Drop support for macOS Big Sur 11

* Update "GET SERVERPREFS" command to get blocking new users setting for Claris FileMaker Server 2024 (#38)

* Drop support for Claris FileMaker Server 19.5 (#37)

* Update "SET SERVERPREFS" command to set blocking new users setting for Claris FileMaker Server 2024 (#39)

* Update "SET SERVERPREFS" command to set persistent cache setting, persistent cache sync setting and database server auto restart setting (#40)

* Update release-notes.txt for Claris FileMaker Server 2023 and 2024 (#32, #37)

* Revise codes

* Correct the default value for the maximum number of hosted database files per FileMaker Server instance (#34, #35)

* Update go.yml and release.yml for GitHub Actions to build with Go 1.22 (#37)

* Add files for trying to use GitHub Container Registry

* Update workflow files for CI

* Update files for trying to use GitHub Container Registry

* Update Dockerfile for GitHub Container Registry

* Update workflow files for CI

* Upgrade jwt-go to v5

* Update release-notes.txt (#32, #37)

* Update README.md for version 2.2.0

* Update go.mod and go.sum (#32, #37)

* Update README.md for version 2.2.0 (#32, #37)

* Release fmcsadmin 2.2.0 (#32, #37)
  • Loading branch information
matsuo authored Aug 28, 2024
1 parent d89714b commit 946b020
Show file tree
Hide file tree
Showing 14 changed files with 860 additions and 253 deletions.
102 changes: 94 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build
name: Build

on: [push, pull_request]
on: [ push, pull_request ]

jobs:

Expand All @@ -10,18 +10,104 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go: ['1.19']
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
os: [ 'ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04', 'ubuntu-latest', 'macos-12', 'macos-13', 'macos-14', 'macos-latest', 'windows-2019', 'windows-2022', 'windows-latest' ]
go: [ '1.22' ]
steps:

- uses: actions/setup-go@v2
- name: Setup go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
cache: false
go-version: ${{ matrix.go }}
check-latest: true

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- run: go test

- run: go build
- shell: bash
run: echo "fmcsadmin_version=2.2.0" >> "$GITHUB_ENV"

# based on: github.com/koron-go/_skeleton/.github/workflows/go.yml
- run: go build -ldflags "-X main.version=${{ env.fmcsadmin_version }}" fmcsadmin.go

- if: runner.os == 'macOS'
run: make dist && cp -p "dist/fmcsadmin-${{ env.fmcsadmin_version }}-macos/fmcsadmin" .

- if: runner.os == 'Linux' && matrix.os == 'ubuntu-22.04'
run: make build-linux-arm64

- shell: bash
run: echo "goss_commit_hash=aed56336c3e8ff683e9540065b502f423dd6760d" >> "$GITHUB_ENV" # v0.4.8

- if: runner.os == 'macOS' || runner.os == 'Windows'
shell: bash
run: echo "GOSS_USE_ALPHA=1" >> "$GITHUB_ENV"

- if: runner.os == 'Linux'
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN_202506 }}

- if: runner.os == 'Linux'
name: Pull from GitHub Container Registry
run: |
docker pull --platform=linux/amd64 ghcr.io/matsuo/goss:latest
docker run --platform=linux/amd64 --rm -i -v /$(pwd):/tmp ghcr.io/matsuo/goss:latest bash <<'EOF'
cd /root/go/src/github.com/goss-org/goss
cp ./release/goss-darwin-amd64 /tmp/goss-darwin-amd64
cp ./release/goss-darwin-arm64 /tmp/goss-darwin-arm64
cp ./release/goss-linux-amd64 /tmp/goss-linux-amd64
cp ./release/goss-linux-arm64 /tmp/goss-linux-arm64
EOF
- if: runner.os == 'macOS'
run: |
curl -L "https://github.com/goss-org/goss/archive/${{ env.goss_commit_hash }}.tar.gz" -o goss.tar.gz
tar xzvf goss.tar.gz
cd "goss-${{ env.goss_commit_hash }}"
make build
cd ..
- if: runner.os == 'Windows'
shell: bash
run: |
curl -L "https://github.com/goss-org/goss/archive/${{ env.goss_commit_hash }}.tar.gz" -o goss.tar.gz
tar xzvf goss.tar.gz
cd "goss-${{ env.goss_commit_hash }}"
go build -o goss-windows-amd64.exe github.com/goss-org/goss/cmd/goss
mkdir release
mv goss-windows-amd64.exe release/
cd ..
- if: runner.os == 'Linux'
run: |
./goss-linux-amd64 --version
OS=linux ./goss-linux-amd64 --gossfile tests/goss.yaml validate --format documentation
- if: runner.os == 'macOS'
run: |
OS=darwin "./goss-${{ env.goss_commit_hash }}/release/goss-darwin-amd64" --gossfile tests/goss.yaml validate --format documentation
- if: runner.os == 'Windows'
shell: bash
run: |
OS=windows "./goss-${{ env.goss_commit_hash }}/release/goss-windows-amd64.exe" --gossfile tests/goss.yaml validate --format documentation
- run: ./fmcsadmin -v

- if: runner.os == 'Linux' && matrix.os == 'ubuntu-22.04'
name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

- if: runner.os == 'Linux' && matrix.os == 'ubuntu-22.04'
run: |
docker run --rm --env GOSS_COMMIT_HASH=${{ env.goss_commit_hash }} -i -v /$(pwd):/tmp arm64v8/ubuntu:22.04 bash <<'EOF'
cd /tmp
cp -p ./dist/linux-arm64/fmcsadmin ./fmcsadmin
OS=linux "./goss-linux-arm64" --gossfile tests/goss.yaml validate --format documentation
./fmcsadmin -v
EOF
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Image

on:
push:
paths:
- 'Dockerfile'

jobs:
publish:
name: Publish Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN_202506 }}
- name: Container meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/matsuo/goss
tags: |
type=raw,value=latest
type=sha,prefix=,suffix=,format=short
- name: Push to GitHub Container Registry
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
35 changes: 25 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: Release

on:
push:
Expand All @@ -7,20 +7,23 @@ on:

jobs:
build:
name: Build
name: Release
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
go: ['1.19']
# https://docs.github.com/ja/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
os: [ 'macos-latest' ]
go: [ '1.22' ]
steps:

- uses: actions/setup-go@v2
- name: Setup go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
cache: false
go-version: ${{ matrix.go }}

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- run: make dist

Expand All @@ -33,7 +36,7 @@ jobs:
- name: Create release
id: create_release
uses: actions/[email protected]
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -43,9 +46,9 @@ jobs:
draft: true
prerelease: false

- name: Upload Release Asset for Linux
- name: Upload Release Asset for Linux (amd64)
id: upload-release-asset-for-linux
uses: actions/[email protected]
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -55,9 +58,21 @@ jobs:
asset_name: fmcsadmin-${{ steps.version.outputs.version }}-linux.tar.gz
asset_content_type: application/gzip

- name: Upload Release Asset for Linux (arm64)
id: upload-release-asset-for-linux-arm64
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/fmcsadmin-${{ steps.version.outputs.version }}-linux-arm64.tar.gz
asset_name: fmcsadmin-${{ steps.version.outputs.version }}-linux-arm64.tar.gz
asset_content_type: application/gzip

- name: Upload Release Asset for Windows (x64)
id: upload-release-asset-for-windows-x64
uses: actions/[email protected]
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM --platform=linux/x86_64 ubuntu:22.04

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish Image

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/x86_64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish Image

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/x86_64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish Image

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/x86_64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

RUN apt update && apt install -y curl tar make bash git build-essential

# Install Go
WORKDIR /root

RUN curl -LO https://go.dev/dl/go1.22.6.linux-amd64.tar.gz && tar -C /tmp -xzf go1.22.6.linux-amd64.tar.gz && rm -f /root/go1.22.6.linux-amd64.tar.gz && mv /tmp/go go1.22

WORKDIR /root/go/src/go.googlesource.com/go

RUN git clone https://go.googlesource.com/go goroot && cd goroot && git checkout release-branch.go1.23 && cd src && export GOROOT_BOOTSTRAP=/root/go1.22 && ./all.bash

RUN cp -pr /root/go1.22 /usr/local/go

# Install Goss
WORKDIR /root/go/src/github.com/goss-org

ARG GOSS_VERSION="0.4.8"
ARG GOSS_COMMIT_HASH="aed56336c3e8ff683e9540065b502f423dd6760d"

RUN curl -L https://github.com/goss-org/goss/archive/${GOSS_COMMIT_HASH}.tar.gz | tar -xzvf -

RUN mv goss-${GOSS_COMMIT_HASH} goss && cd goss && PATH=$PATH:/usr/local/go/bin TRAVIS_TAG=${GOSS_VERSION} make build
21 changes: 18 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME=fmcsadmin
VERSION=2.1.0
VERSION=2.2.0

GOCMD=go
GOBUILD=$(GOCMD) build
Expand All @@ -8,17 +8,19 @@ GOGET=$(GOCMD) get
GOINSTALL=$(GOCMD) install
DIST_DIR=dist
LINUX_DIR=linux
LINUX_ARM64_DIR=linux-arm64
MACOS_DIR=macos
MACOS_ALT_DIR=macos-alt
WINDOWS_DIR=windows-x64
DIST_LINUX_DIR=$(NAME)-$(VERSION)-$(LINUX_DIR)
DIST_LINUX_ARM64_DIR=$(NAME)-$(VERSION)-$(LINUX_ARM64_DIR)
DIST_MACOS_DIR=$(NAME)-$(VERSION)-$(MACOS_DIR)
DIST_WINDOWS_DIR=$(NAME)-$(VERSION)-$(WINDOWS_DIR)

all: test build

deps:
$(GOGET) github.com/golang-jwt/jwt/v4
$(GOGET) github.com/golang-jwt/jwt/v5
$(GOINSTALL) github.com/mattn/go-scan
$(GOINSTALL) github.com/olekukonko/tablewriter
$(GOINSTALL) golang.org/x/term
Expand All @@ -31,12 +33,16 @@ test: deps
clean:
@rm -rf $(DIST_DIR)

build: build-linux build-macos build-windows
build: build-linux build-linux-arm64 build-macos build-windows

build-linux:
mkdir -p $(DIST_DIR)/$(LINUX_DIR)
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GOBUILD) -ldflags "-X main.version=$(VERSION)" -o $(DIST_DIR)/$(LINUX_DIR)/$(NAME)

build-linux-arm64:
mkdir -p $(DIST_DIR)/$(LINUX_ARM64_DIR)
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 $(GOBUILD) -ldflags "-X main.version=$(VERSION)" -o $(DIST_DIR)/$(LINUX_ARM64_DIR)/$(NAME)

ifeq ($(shell uname -m),x86_64)
build-macos:
mkdir -p $(DIST_DIR)/$(MACOS_DIR)
Expand Down Expand Up @@ -72,6 +78,15 @@ dist-multiplatform: deps build
tar -zcf $(DIST_LINUX_DIR).tar.gz $(DIST_LINUX_DIR) && \
cd ..

cd $(DIST_DIR) && \
mv $(LINUX_ARM64_DIR) $(DIST_LINUX_ARM64_DIR) && \
cp -p ../LICENSE.txt $(DIST_LINUX_ARM64_DIR)/ && \
cp -p ../NOTICE.txt $(DIST_LINUX_ARM64_DIR)/ && \
cp -p ../README.md $(DIST_LINUX_ARM64_DIR)/ && \
cp -p ../release-notes.txt $(DIST_LINUX_ARM64_DIR)/ && \
tar -zcf $(DIST_LINUX_ARM64_DIR).tar.gz $(DIST_LINUX_ARM64_DIR) && \
cd ..

cd $(DIST_DIR) && \
mv $(MACOS_DIR) $(DIST_MACOS_DIR) && \
cp -p ../LICENSE.txt $(DIST_MACOS_DIR)/ && \
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fmcsadmin
Copyright 2017-2023 Emic Corporation, https://www.emic.co.jp/
Copyright 2017-2024 Emic Corporation, https://www.emic.co.jp/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 946b020

Please sign in to comment.