Skip to content

Commit

Permalink
ci: fetch all refs and tags
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Jul 6, 2022
1 parent e9ffaad commit f7c23a6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .chglog/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/ovrclk/akash
repository_url: https://github.com/ovrclk/provider-services
options:
commits:
# filters:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
with:
fetch-depth: 0
- uses: c-py/action-dotenv-to-setenv@v3
with:
env-file: .env
Expand Down
12 changes: 5 additions & 7 deletions make/releasing.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ docker-image:
-e BUILD_TAGS="$(BUILD_TAGS)" \
-e BUILD_VARS="$(GORELEASER_BUILD_VARS)" \
-e STRIP_FLAGS="$(GORELEASER_STRIP_FLAGS)" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/github.com/ovrclk/provider-services \
$(AKASH_BIND_LOCAL) \
-v /var/run/docker.sock:/var/run/docker.sock $(AKASH_BIND_LOCAL) \
-v $(shell pwd):/go/src/github.com/ovrclk/provider-services \
-w /go/src/github.com/ovrclk/provider-services \
$(GORELEASER_IMAGE) \
-f .goreleaser-docker.yaml \
Expand All @@ -64,9 +63,8 @@ release-dry-run: modvendor gen-changelog
-e BUILD_TAGS="$(BUILD_TAGS)" \
-e BUILD_VARS="$(GORELEASER_BUILD_VARS)" \
-e STRIP_FLAGS="$(GORELEASER_STRIP_FLAGS)" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/github.com/ovrclk/provider-services \
-v /Users/amr/go/src:/Users/amr/go/src \
-v /var/run/docker.sock:/var/run/docker.sock $(AKASH_BIND_LOCAL) \
-v $(shell pwd):/go/src/github.com/ovrclk/provider-services \
-w /go/src/github.com/ovrclk/provider-services \
$(GORELEASER_IMAGE) \
-f "$(GORELEASER_CONFIG)" \
Expand Down Expand Up @@ -94,7 +92,7 @@ release: modvendor gen-changelog
-e HOMEBREW_CUSTOM="$(GORELEASER_HOMEBREW_CUSTOM)" \
--env-file .release-env \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/github.com/ovrclk/provider-services \
-v $(shell pwd):/go/src/github.com/ovrclk/provider-services \
-w /go/src/github.com/ovrclk/provider-services \
$(GORELEASER_IMAGE) \
-f "$(GORELEASER_CONFIG)" release \
Expand Down
26 changes: 2 additions & 24 deletions script/genchangelog.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
#!/usr/bin/env bash

# generated changelog depends on the tag type
# only SEMVER tags are accounted
# there are two type of tag distinguished by minor part of the semver:
# - even number: mainnet
# - odd number: testnet
# net detection is done in section s1

# there are two type release notes generated
# - prerelease: changelog between current and nearest lower prerelease (or previous release)
# for example current tag v0.1.1-rc.10 and previous was v0.1.1-rc.9, so changelog is generated between
# - release: changelog between current and previous release tags
# mainnet status is taken care as well. if current tag is edgenet (e.g. v0.1.1-rc.10) it
# will be generated to edgenet changes only

PATH=$PATH:$(pwd)/.cache/bin
export PATH=$PATH

Expand All @@ -26,17 +12,9 @@ fi

to_tag=$1

# s1
is_mainnet=$("${SCRIPT_DIR}"/mainnet-from-tag.sh "$to_tag")
if [[ $is_mainnet == false ]]; then
version_rel="^[v|V]?(0|[1-9][0-9]*)\\.(\\d*[13579])\\.(0|[1-9][0-9]*)$"
version_prerel="^[v|V]?(0|[1-9][0-9]*)\\.(\\d*[13579])\\.(0|[1-9][0-9]*)(\\-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"
else
version_rel="^[v|V]?(0|[1-9][0-9]*)\.(\d*[02468])\.(0|[1-9][0-9]*)$"
version_prerel="^[v|V]?(0|[1-9][0-9]*)\.(\d*[02468])\.(0|[1-9][0-9]*)(\-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$"
fi
version_rel="^[v|V]?(0|[1-9][0-9]*)\\.(\\d*[0-9])\\.(0|[1-9][0-9]*)$"
version_prerel="^[v|V]?(0|[1-9][0-9]*)\\.(\\d*[0-9])\\.(0|[1-9][0-9]*)(\\-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"

# s2
if [[ -z $("${SCRIPT_DIR}"/semver.sh get prerel "$to_tag") ]]; then
tag_regexp=$version_rel
else
Expand Down

0 comments on commit f7c23a6

Please sign in to comment.