Skip to content

Commit 55ccb30

Browse files
authored
Feature/release workflow (#57)
* Update release.yaml Signed-off-by: Alex Jones <[email protected]> * Update release.yaml Signed-off-by: Alex Jones <[email protected]> * moving the flagd update sequence out for the workflow * moving the flagd update sequence out for the workflow * moving the flagd update sequence out for the workflow * moving the flagd update sequence out for the workflow Signed-off-by: Alex Jones <[email protected]>
1 parent e13d4f2 commit 55ccb30

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/release.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
env:
1010
REGISTRY: ghcr.io
1111
IMAGE_NAME: ${{ github.repository }}
12+
FLAGD_VERSION: v0.0.3
1213

1314
jobs:
1415
build:
@@ -18,7 +19,6 @@ jobs:
1819
uses: actions/checkout@v2
1920
with:
2021
submodules: recursive
21-
2222
- name: Get the version
2323
id: get_version
2424
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
@@ -27,9 +27,10 @@ jobs:
2727
with:
2828
go-version: '1.18.1'
2929
- run: |
30+
make update-flagd
3031
go mod tidy
3132
cp schemas/json-schema/flagd-definitions.json pkg/utils/flagd-definitions.json
32-
make generate
33+
make controller-gen
3334
IMG=ghcr.io/open-feature/open-feature-operator:${GITHUB_REF#refs/*/} make release-manifests
3435
3536
- name: Release

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ help: ## Display this help.
4444
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
4545
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
4646

47+
.PHONY: update-flagd
48+
update-flagd:
49+
./hack/update-flagd.sh ${FLAGD_VERSION}
4750
.PHONY: generate
48-
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
49-
sed -i '' -e 's/INPUT_FLAGD_VERSION/${FLAGD_VERSION}/g' config/manager/manager.yaml
51+
generate: update-flagd controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
5052
cp schemas/json-schema/flagd-definitions.json pkg/utils/flagd-definitions.json
5153
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
5254

hack/update-flagd.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
FLAGD_VERSION=$1
3+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
4+
sed -i "s/INPUT_FLAGD_VERSION/${FLAGD_VERSION}/g" config/manager/manager.yaml
5+
elif [[ "$OSTYPE" == "darwin"* ]]; then
6+
sed -i '' -e "s/INPUT_FLAGD_VERSION/${FLAGD_VERSION}/g" config/manager/manager.yaml
7+
fi

0 commit comments

Comments
 (0)