Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/workflows/update-version-file.yml
Comment thread
hailihu marked this conversation as resolved.

This file was deleted.

Comment thread
hailihu marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,13 @@ jobs:

- name: Determine version or branch
run: |
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
VERSION="${GITHUB_REF_NAME}"
elif [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
VERSION=$(git rev-parse --abbrev-ref HEAD)
else
VERSION="${GITHUB_REF_NAME}"
fi
VERSION="${GITHUB_REF_NAME}"
echo "Using version identifier: ${VERSION}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV

- name: Update version in ada script
run: |
sed -i "s/ADA_VERSION=.*/ADA_VERSION=\"${VERSION}\"/" ada/ada
sed -i".tmp" "s/ADA_VERSION=.*/ADA_VERSION=\"${VERSION}\"/" ada/ada

- name: Commit and push updated ada script
run: |
Expand Down
8 changes: 5 additions & 3 deletions ada/ada
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ get_permissions () {
# Set default values and initialize variables
#
set_defaults() {
# The ADA_VERSION value will be automatically updated by Github action Update-ada-version.yml
# For a release, it will contain the version number (like v3.1).
# For a branch, it will contain the branch name.
ADA_VERSION="123-provide-reliable-ada---version"
args=
api=
debug=false
Expand Down Expand Up @@ -399,9 +403,7 @@ get_args() {
usage
;;
--version )
git_dir=$(dirname "${script_dir}")
_VERSION_PLACEHOLDER=$(git --git-dir="${git_dir}/.git" describe --tags --abbrev=0 2>/dev/null || echo "v3.0+")
echo "${_VERSION_PLACEHOLDER}"
echo "$ADA_VERSION"
exit 1
;;
--tokenfile )
Expand Down
1 change: 0 additions & 1 deletion ada/etc/ada-version

This file was deleted.