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
7 changes: 1 addition & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ Only appointed team members may release versions.
- `poetry version N.N.N`
2. Review. Commit. Push.
3. Create release and tag on GitHub.
4. Annotate Github's tag:\
`bin/annotate-tag.sh vN.N.N`\
(where `N.N.N` is the version tag)
5. Overwrite remote tag with annotated one:\
`git push --tags --force`
6. [Build & Deploy](../README.md#build--deploy-project) `main` branch.[^1]
4. [Build & Deploy](../README.md#build--deploy-project) `main` branch.[^1]

[^1]: So that new CMS image is tagged `latest` and `vN.N.N`.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DOCKER_COMPOSE_CMD := $(shell if command -v docker-compose > /dev/null; then ech
# NOTE: Special characters in `DOCKER_IMAGE_BRANCH` are replaced with dashes.
DOCKER_IMAGE_BRANCH := $(DOCKERHUB_REPO):$(shell git describe --exact-match --tags 2> /dev/null || git symbolic-ref --short HEAD | sed 's/[^[:alnum:]\.\_\-]/-/g')

BUILD_ID := $(shell git describe --always)
BUILD_ID := $(shell git describe --tags)

.PHONY: build
build:
Expand Down
37 changes: 0 additions & 37 deletions bin/annotate-tag.sh

This file was deleted.

3 changes: 2 additions & 1 deletion bin/build-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

const buildStylesheets = require('@tacc/core-styles').buildStylesheets;
const mininmist = require('minimist');
const gitDescribe = require('./git-describe');

const ROOT = __dirname + '/..';
const ARGS = mininmist( process.argv.slice( 2 ) );
const BUILD_ID = ARGS['build-id'] || '';
const BUILD_ID = ARGS['build-id'] || gitDescribe();

/** Build stylesheets */
(() => {
Expand Down
19 changes: 19 additions & 0 deletions bin/git-describe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env node

/** Get tag-based description from Git */
function gitDescribe() {
const { execSync } = require('child_process');

let gitDescribe = undefined;

try {
gitDescribe = execSync('git describe --tags', { encoding: 'utf8' }).trim();
console.log('Output from `git describe`:', gitDescribe);
} catch (error) {
console.error('Error running `git describe`:', error.message);
}

return gitDescribe;
}

module.exports = gitDescribe;